Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

crosh

crosh

ctrl + alt + t

Use ctrl + alt + t to open the browser/crosh

Tests

Testing Disk

It’s safe to test both types of drive

crosh> storage_test_1
<This feature is not supported>


crosh> storage_test_2
Checking blocks 0 to 61145087
Checking for bad blocks (read-only test):  24.96% done, 1:30 elapsed. (0/0/0 errors)

Swap

crosh> swap status
Filename                                Type            Size            Used            Priority
/dev/zram0                              partition       15706004        909312          -2
low-memory margin (MiB): 408 3141 
min_filelist_kbytes (KiB): 0
ram_vs_swap_weight: 4
extra_free_kbytes (KiB): 0

top-level entries in /sys/block/zram0:
alignment_offset:0
backing_dev:none
bd_stat:       0        0        0
capability:10
comp_algorithm:lzo [lzo-rle] 
debug_stat:version: 1
debug_stat:       0        0
dev:253:0
discard_alignment:0
disksize:16082952192
events_poll_msecs:-1
ext_range:1
hidden:0
inflight:       0        0
initstate:1
io_stat:       0        0        0   219392
max_comp_streams:4
mm_stat:930619392 304898802 362450944        0 413831168    49495     5438    16649
range:1
removable:0
ro:0
size:31412016
stat:  186094        0  1488752     1515   446594        0  3572752     3449        0    15289     4964        0        0        0        0        0        0
uevent:MAJOR=253
uevent:MINOR=0
uevent:DEVNAME=zram0
uevent:DEVTYPE=disk
writeback_limit:0

Battery

crosh> battery_test 30
2023-08-04T14:34:40.504587Z ERROR dump_power_status: [cros_ec_prefs_source.cc(23)] Failed to open /dev/cros_ec: Permission denied (13)
2023-08-04T14:34:40.557070Z ERROR dump_power_status: [cros_ec_prefs_source.cc(23)] Failed to open /dev/cros_ec: Permission denied (13)
2023-08-04T14:34:40.572159Z ERROR dump_power_status: [cros_ec_prefs_source.cc(23)] Failed to open /dev/cros_ec: Permission denied (13)
2023-08-04T14:34:40.584564Z ERROR dump_power_status: [cros_ec_prefs_source.cc(23)] Failed to open /dev/cros_ec: Permission denied (13)
2023-08-04T14:34:40.594065Z ERROR dump_power_status: [cros_ec_prefs_source.cc(23)] Failed to open /dev/cros_ec: Permission denied (13)
Battery is discharging (57.22% left)
Battery health: 75.50%
Please wait...
2023-08-04T14:35:10.618933Z ERROR dump_power_status: [cros_ec_prefs_source.cc(23)] Failed to open /dev/cros_ec: Permission denied (13)
Battery discharged 0.13% in 30 second(s).

Cycle count and other pertinent info

crosh> battery_firmware info
EC result 3 (INVALID_PARAM)
Battery info:
  OEM name:               AS1GUIc
  Model number:           C434-41
  Chemistry   :           OTC0
  Serial number:          0C3B
  Design capacity:        4040 mAh
  Last full charge:       3053 mAh
  Design output voltage   11895 mV
  Cycle count             128
  Present voltage         11156 mV
  Present current         438 mA (discharging)
  Remaining capacity      1462 mAh
  Flags                   0x06 BATT_PRESENT DISCHARGING

Ram

crosh> memory_test
memtester version 4.2.2 (64-bit)
Copyright (C) 2010 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 651MB (682622976 bytes)
got  651MB (682622976 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok         
  Block Sequential    : testing 202
  

Blue Tooth

crosh> bt_console
Agent registered
AdvertisementMonitor path registered
[bluetooth]# help
Menu main:
Available commands:
-------------------
advertise                                         Advertise Options Submenu
monitor                                           Advertisement Monitor Options Submenu
scan                                              Scan Options Submenu
gatt                                              Generic Attribute Submenu
admin                                             Admin Policy Submenu
list                                              List available controllers
show [ctrl]                                       Controller information
select <ctrl>                                     Select default controller
devices [Paired/Bonded/Trusted/Connected]         List available devices, with an optional property as the filter
system-alias <name>                               Set controller alias
reset-alias                                       Reset controller alias
power <on/off>                                    Set controller power
pairable <on/off>                                 Set controller pairable mode
discoverable <on/off>                             Set controller discoverable mode
discoverable-timeout [value]                      Set discoverable timeout
agent <on/off/capability>                         Enable/disable agent with given capability
default-agent                                     Set agent as the default one
advertise <on/off/type>                           Enable/disable advertising with given type
set-alias <alias>                                 Set device alias
scan <on/off>                                     Scan for devices
info [dev]                                        Device information
pair [dev]                                        Pair with device
cancel-pairing [dev]                              Cancel pairing with device
trust [dev]                                       Trust device
untrust [dev]                                     Untrust device
block [dev]                                       Block device
unblock [dev]                                     Unblock device
remove <dev>                                      Remove device
connect-classic <dev>                             Connect device classic bearer
connect-le <dev>                                  Connect device
connect <dev>                                     Connect device LE bearer
disconnect [dev]                                  Disconnect device
disconnect-old [dev]                              Disconnect device using old method
disconnect-le [dev]                               Disconnect LE bearer
menu <name>                                       Select submenu
version                                           Display version
quit                                              Quit program
exit                                              Quit program
help                                              Display help about this program
export                                            Print environment variables

Resource Use

Free

crosh> free --human
               total        used        free      shared  buff/cache   available
Mem:           7.7Gi       3.9Gi       222Mi       3.0Gi       3.5Gi       259Mi
Swap:           14Gi       3.1Gi        11Gi

meminfo

crosh> meminfo
MemTotal:        8041476 kB
MemFree:          471892 kB
MemAvailable:     502844 kB
Buffers:           18296 kB
Cached:          4300012 kB
SwapCached:          116 kB
Active:          3981152 kB
Inactive:        1922692 kB
Active(anon):    3687916 kB
Inactive(anon):  1839228 kB
Active(file):     293236 kB
Inactive(file):    83464 kB
Unevictable:      329532 kB
Mlocked:           49244 kB
SwapTotal:      15706004 kB
SwapFree:       13564308 kB
Dirty:              2808 kB
Writeback:             0 kB
AnonPages:       1914884 kB
Mapped:          3362720 kB
Shmem:           3941608 kB
KReclaimable:     138932 kB
Slab:             321508 kB
SReclaimable:     138932 kB
SUnreclaim:       182576 kB
KernelStack:       19760 kB
PageTables:        81240 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    19726740 kB
Committed_AS:   18786220 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      167420 kB
VmallocChunk:          0 kB
Percpu:             2352 kB
AnonHugePages:     49152 kB
ShmemHugePages:  1939456 kB
ShmemPmdMapped:  1935360 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
DirectMap4k:      386652 kB
DirectMap2M:     7897088 kB
DirectMap1G:           0 kB

uptime

crosh> uptime
 09:01:27 up  2:09,  0 users,  load average: 0.17, 0.34, 0.58

shell commands

this is not the same as your LXC!!!

crosh> shell
chronos@localhost / $ cat /etc/os-release
ID=chromeos
ID_LIKE=chromiumos
GOOGLE_CRASH_ID=ChromeOS
NAME=Chrome OS
HOME_URL=https://www.chromium.org/chromium-os
BUG_REPORT_URL=https://crbug.com/new
VERSION=114
VERSION_ID=114
BUILD_ID=15437.63.0

chromos version

chronos@localhost / $ sudo /opt/google/chrome/chrome --version
Google Chrome 114.0.5735.239 

sbin

chronos@localhost / $ ls /sbin
agetty                       crash_reporter             fsck.ext3                 lnstat                  mount.ntfs-3g        runuser                  upstart-event-bridge
arp                          crash_sender               fsck.ext4                 logsave                 nameif               session_manager          upstart-file-bridge
audisp-syslog                cros_sysrq_init            fsfreeze                  losetup                 net_poll_tool        setcap                   upstart-local-bridge
auditctl                     ctrlaltdel                 fstrim                    lvchange                nologin              setfiles                 upstart-socket-bridge
auditd                       ctstat                     genl                      lvconvert               nstat                sfdisk                   upstart-udev-bridge
augenrules                   dcb                        getcap                    lvcreate                pam_tally            shutdown                 ureadahead
aureport                     debugd                     getpcaps                  lvdisplay               pam_tally2           ss                       usermode-helper
ausearch                     debugfs                    halt                      lvextend                pam_timestamp_check  start                    vdpa
autrace                      depmod                     hdparm                    lvm                     pdata_tools          static_node_tool         vgcfgbackup
badblocks                    devlink                    hwclock                   lvmconf                 pivot_root           status                   vgcfgrestore
blkdeactivate                dhcpcd                     idectl                    lvmconfig               poweroff             stop                     vgchange
blkdiscard                   display_low_battery_alert  ifstat                    lvmdiskscan             pvchange             sulogin                  vgck
blkid                        dmfilemapd                 init                      lvmdump                 pvck                 swaplabel                vgconvert
blkzone                      dmsetup                    initctl                   lvmpolld                pvcreate             swapoff                  vgcreate
blockdev                     dmstats                    insmod                    lvmsadc                 pvdisplay            swapon                   vgdisplay
brctl                        dumpe2fs                   installkernel             lvmsar                  pvmove               switch_root              vgexport
bridge                       e2fsck                     ip6tables                 lvreduce                pvremove             tc                       vgextend
cache_check                  e2image                    ip6tables-legacy          lvremove                pvresize             telinit                  vgimport
cache_dump                   e2label                    ip6tables-legacy-restore  lvrename                pvs                  thin_check               vgimportclone
cache_metadata_size          e2mmpstatus                ip6tables-legacy-save     lvresize                pvscan               thin_delta               vgmerge
cache_repair                 e2scrub                    ip6tables-restore         lvs                     rarp                 thin_dump                vgmknodes
cache_restore                e2scrub_all                ip6tables-save            lvscan                  rdma                 thin_ls                  vgreduce
cache_writeback              e2undo                     ipmaddr                   mii-tool                reboot               thin_metadata_size       vgremove
capsh                        era_check                  iptables                  minijail0               reload               thin_repair              vgrename
cfdisk                       era_dump                   iptables-legacy           mke2fs                  request-key          thin_restore             vgs
chcpu                        era_invalidate             iptables-legacy-restore   mkfs                    resize2fs            thin_rmap                vgscan
chromeos-boot-alert          era_restore                iptables-legacy-save      mkfs.ext2               restart              thin_trim                vgsplit
chromeos-disk-metrics        fdisk                      iptables-restore          mkfs.ext3               restorecon           tipc                     wipefs
chromeos-send-kernel-errors  featured                   iptables-save             mkfs.ext4               restorecon_xattr     tune2fs                  xtables-legacy-multi
chromeos_shutdown            file_attrs_cleaner_tool    iptables-xml              mkhomedir_helper        rmmod                udevd                    zramctl
chromeos_startup             findfs                     iptunnel                  mkswap                  routel               umount.ecryptfs
chromeos_startup.sh          frecon                     key.dns_resolver          modprobe                rtacct               umount.ecryptfs_private
clobber-log                  fsadm                      keygen                    mount.ecryptfs          rtmon                unix_chkpwd
clobber-state                fsck                       killers                   mount.ecryptfs_private  rtstat               unix_update
consoletype                  fsck.ext2                  ldconfig                  mount.ntfs              runlevel             upstart-dbus-bridge

bin

chronos@localhost / $ ls /usr/bin/
 9s                           dbus-daemon                                       infocmp                     pango-segmentation              sudoedit
'['                           dbus-launch                                       infotocap                   pango-view                      sudoreplay
 aconnect                     dbus-monitor                                      inject_powerd_input_event   paperconf                       sum
 activate_short_dark_resume   dbus-run-session                                  install                     passwd                          superiotool
 adb                          dbus-send                                         inteltool                   paste                           suspend_delay_sample
 airscan-discover             dbus-test-tool                                    ionice                      patchpaneld                     suspend_stress_test
 alsamixer                    dbus-update-activation-environment                ipcmk                       pathchk                         systemd-tmpfiles
 alsatplg                     dbus-uuidgen                                      ipcrm                       pca_agent_client                tabs
 alsaucm                      dbus_send_blutooth_class.awk                      ipcs                        pcre2grep                       tac
 amidi                        dc                                                ipf_ufd                     pcre2test                       tail
 amixer                       debug_sleep_quickly                               ipfhostd                    pcregrep                        taskset
 analyseplugin                dev_debug_vboot                                   ippusb_bridge               pcretest                        tdbbackup
 anomaly_detector             dev_install                                       iptables-xml                pdf2dsc                         tdbdump
 apk-cache-ctl                dir                                               irqtop                      pdf2ps                          tdbrestore
 aplay                        dircolors                                         jcat-tool                   perf                            tdbtool
 aplaymidi                    dirname                                           join                        perfetto                        tee
 applyplugin                  djpeg                                             jpegexiforient              periodic_scheduler              test
 arc-host-clock-service       dlcservice_util                                   jpegtran                    permission_broker               thermal_zone_config
 arc-packages-xml-reader      drmdevice                                         jq                          pf2afm                          tic
 arch                         dtc                                               json-glib-format            pfbtopfa                        timberslide
 arcvm_data_migrator          dtdiff                                            json-glib-validate          pfc                             timeout
 arcvm_server_proxy           du                                                kdestroy                    pg                              tjbench
 arecord                      dumpRSAPublicKey                                  kinit                       pgrep                           tload
 arecordmidi                  dump_fmap                                         klist                       pidof                           tlsdate
 aseqdump                     dump_intel_rapl_consumption                       kms-steal-crtc              pinky                           tlsdate-helper
 aseqnet                      dump_kernel_config                                kms-universal-planes        pkcs1-conv                      tlsdate-routeup
 aserver                      dump_power_status                                 kmstest                     pki                             tlsdated
 asn1Coding                   dumpsexp                                          kpasswd                     pkill                           toe
 asn1Decoding                 dvipdf                                            l2ping                      pmap                            top
 asn1Parser                   e2fsdroid                                         l2test                      png-fix-itxt                    touch
 attestation_client           ecryptfs-add-passphrase                           last                        pngfix                          touchpad-edge-detector
 audio_diagnostics            ecryptfs-find                                     lastb                       power_supply_info               tpm-nvsize
 aulast                       ecryptfs-insert-wrapped-passphrase-into-keyring   lastlog                     powerd                          tpm_manager_client
 aulastlog                    ecryptfs-manager                                  ld.so                       powerd_dbus_suspend             tpmc
 ausyscall                    ecryptfs-migrate-home                             ldbadd                      powerd_setuid_helper            tput
 auvirt                       ecryptfs-mount-private                            ldbdel                      powerd_suspend                  tr
 avahi-browse                 ecryptfs-recover-private                          ldbedit                     pphs                            trace
 avahi-browse-domains         ecryptfs-rewrap-passphrase                        ldbmodify                   pr                              traced
 avahi-publish                ecryptfs-rewrite-file                             ldbrename                   print_sysfs_power_supply_data   traced_probes
 avahi-publish-address        ecryptfs-setup-private                            ldbsearch                   printafm                        transicc
 avahi-publish-service        ecryptfs-setup-swap                               libevdev-tweak-device       printenv                        truncate
 avahi-resolve                ecryptfs-stat                                     libhwsec_client             printer_diag                    tset
 avahi-resolve-address        ecryptfs-umount-private                           line                        printf                          tsort
 avahi-resolve-host-name      ecryptfs-unwrap-passphrase                        link                        prlimit                         tty
 avahi-set-host-name          ecryptfs-verify                                   linkicc                     process_killer                  u2fd
 awk                          ecryptfs-wrap-passphrase                          listplugins                 proptest                        uclampset
 axfer                        ecryptfsd                                         logger                      ps2ascii                        ul
 b2sum                        edid-decode                                       logname                     ps2epsi                         ulockmgr_server
 backlight_tool               eject                                             look                        ps2pdf                          uname
 base32                       elogtool                                          lorgnette                   ps2pdf12                        unexpand
 base64                       enable_dev_usb_boot                               lp                          ps2pdf13                        uniq
 basename                     env                                               lpoptions                   ps2pdf14                        unix-lpr.sh
 basenc                       eps2eps                                           lprsetup.sh                 ps2pdfwr                        unlink
 bashbug                      event_rpcgen.py                                   lpstat                      ps2ps                           unlz4
 battery_saver                evtest                                            lsattr                      ps2ps2                          unlzma
 bc                           ex                                                lscpu                       pscap                           unrar
 bluemoon                     exifautotran                                      lsipc                       psicc                           unshar
 bluetooth_devcd_parser       expand                                            lsirq                       psl                             unshare
 bluetoothctl                 expiry                                            lslocks                     ptx                             unsquashfs
 bootstat_summary             expr                                              lslogins                    pwdx                            unxz
 brotli                       ext2simg                                          lsmem                       python                          unzstd
 bsdcat                       factor                                            lsns                        python-exec2c                   update_engine_client
 bsdcpio                      faillog                                           lsof                        python3                         update_reset_counter
 bsdtar                       fallocate                                         lspci                       python3.6                       uptime
 btadapterd                   fastboot                                          lsusb                       python3.8                       usb-devices
 btattach                     fc-cache                                          lz4                         pzstd                           usbguard
 btclient                     fc-cat                                            lz4c                        qpdf                            usbguard-rule-parser
 btgatt-client                fc-conflist                                       lz4cat                      quipper                         usbhid-dump
 btgatt-server                fc-list                                           lzcat                       rar2fs                          usbreset
 btmanagerd                   fc-match                                          lzcmp                       rctest                          users
 btmgmt                       fc-pattern                                        lzdiff                      rdjpgcom                        utmpdump
 btmon                        fc-query                                          lzegrep                     readlink                        uudecode
 bzcmp                        fc-scan                                           lzfgrep                     realpath                        uuencode
 bzdiff                       fc-validate                                       lzgrep                      rename                          uuidgen
 bzegrep                      fdtdump                                           lzless                      renice                          uuidparse
 bzfgrep                      fdtget                                            lzma                        reset                           vbltest
 bzgrep                       fdtoverlay                                        lzmadec                     resourced                       vbutil_firmware
 bzip2recover                 fdtput                                            lzmainfo                    rev                             vbutil_kernel
 bzless                       ff_debug                                          lzmore                      rfcomm                          vbutil_key
 bzmore                       filecap                                           maitred_client              rootdev                         vbutil_keyblock
 c_rehash                     fincore                                           mawk                        run_oci                         vdir
 cairo-trace                  find                                              mbim-network                runcon                          verity
 cal                          fix-qdf                                           mbimcli                     runtime_probe                   vi
 captest                      flock                                             mcookie                     rvi                             view
 captoinfo                    fmt                                               md5sum                      sane-find-scanner               virgl_test_server
 cbfstool                     fold                                              memd                        sbcdec                          virtual-file-provider
 cbmem                        foomatic-rip                                      memory_suspend_test         sbcenc                          virtual-file-provider-jailed
 cgpt                         foomatic_shell                                    metrics_client              sbcinfo                         vm_cicerone
 chage                        free                                              metrics_daemon              scanimage                       vm_concierge
 chaps_client                 fribidi                                           midis                       scp                             vm_pstore_dump
 chattr                       ftdi_eeprom                                       missived                    script                          vmc
 chcon                        fuse-archive                                      mist                        scriptlive                      vmlog_forwarder
 check_powerd_config          fusebox                                           mk_cmds                     scriptreplay                    vmstat
 chfn                         fusermount                                        mke2fs.android              sdptool                         vsh
 chkcon                       futility                                          mkfifo                      secure_erase_file               vshd
 chmem                        fwupdmgr                                          mkr2i                       send_debug_power_status         w
 choom                        fwupdtool                                         mksquashfs                  send_metrics_on_resume          watch
 chromeos-pgmem               gamma4scanimage                                   mktemp                      seneschal                       wc
 chromeos-tpm-recovery        gapplication                                      ml_service                  seneschal_client                wg
 chroot                       gbb_utility                                       mmc                         seq                             whereis
 chrt                         gcab                                              mmcli                       set_apn                         which
 chsh                         gdbus                                             modem                       set_arpgw                       who
 chunneld                     generate_camera_profile                           modeprint                   set_blkdev_pm                   whoami
 cicerone_client              generate_logs                                     modetest                    set_bluetooth_coredump.sh       wpa_cli
 ciptool                      get_bluetooth_device_class.sh                     mojo_service_manager        set_cellular_ppp                wpa_debug
 cjpeg                        getopt                                            mount-passthrough           set_cellular_transmit_power     wpa_passphrase
 cksum                        gio                                               mount-passthrough-jailed    set_power_policy                wrjpgcom
 clear                        gio-querymodules                                  mount-zip                   set_short_powerd_timeouts       x86_64-cros-linux-gnu-fc-cache
 col                          glib-compile-resources                            mouse-dpi-tool              set_wake_on_lan                 x86_64-cros-linux-gnu-gio-querymodules
 colcrt                       glib-compile-schemas                              mpicalc                     set_wifi_transmit_power         xargs
 colrm                        glib-gettextize                                   mpris-proxy                 setsid                          xb-tool
 column                       gobject-query                                     namei                       setterm                         xkbcli
 comm                         gpasswd                                           net                         sexp-conv                       xmlcatalog
 compile_et                   gpg-error                                         netcap                      sftp                            xmllint
 concierge_client             gs                                                nettle-hash                 sg                              xmlwf
 config_net_log               gsbj                                              nettle-lfib-stream          sha1sum                         xxh128sum
 connectivity                 gsdj                                              nettle-pbkdf2               sha224sum                       xxh32sum
 convert-dtsv0                gsdj500                                           network_diag                sha256sum                       xxh64sum
 core2md                      gsettings                                         newgidmap                   sha384sum                       xxhsum
 coreutils                    gslj                                              newgrp                      sha512sum                       xz
 cpufreq_config               gslp                                              newuidmap                   shar                            xzcat
 cras                         gsnd                                              nice                        shill                           xzcmp
 cras_test_client             gss-client                                        nih-dbus-tool               shill_login_user                xzdec
 cras_tests                   gtester                                           nl                          shill_logout_user               xzdiff
 cros-disks                   gusbcmd                                           nohup                       shlibsign                       xzegrep
 cros-health-tool             gzexe                                             nproc                       shred                           xzfgrep
 cros-minidiag-tool           hardlink                                          nsenter                     shuf                            xzgrep
 cros_camera_algo             hardware_verifier                                 ntfs-3g                     slabtop                         xzless
 cros_camera_service          hb-ot-shape-closure                               ntfs-3g.probe               sleep                           xzmore
 cros_config                  hb-shape                                          ntfscat                     smbclient                       yat2m
 cros_config_mock             hb-subset                                         ntfscluster                 sort                            yes
 cros_healthd                 hciattach                                         ntfscmp                     speaker-test                    zcmp
 cros_installer               hciconfig                                         ntfsfix                     split                           zdiff
 cros_region_data             hcidump                                           ntfsinfo                    ssh                             zegrep
 crosh                        hcitool                                           ntfsls                      ssh-add                         zfgrep
 crosh.sh                     head                                              ntfsrecover                 ssh-agent                       zforce
 crosid                       hex2hcd                                           ntfssecaudit                ssh-copy-id                     zgrep
 crossystem                   hexdump                                           ntfstruncate                ssh-keygen                      zless
 crostini_client              hmac256                                           ntfsusermap                 ssh-keyscan                     zlib-flate
 crosvm                       hostid                                            ntfswipe                    sshfs                           zmore
 csplit                       id                                                numfmt                      start_bluetoothd.sh             znew
 cupstestppd                  idn2                                              nvramtool                   start_bluetoothlog.sh           zstd
 curl                         iecset                                            od                          stat                            zstdcat
 cut                          ifdtool                                           openssl                     stdbuf                          zstdgrep
 cvtsudoers                   ijs_client_example                                p11_replay                  stressapptest                   zstdless
 dbus-cleanup-sockets         ijs_server_example                                pango-list                  sudo                            zstdmt

help_advanced

crosh> help_advanced
Usage: arc
 [ ping [ NETWORK ] [ <ip address> | <hostname> ] |
   http [ NETWORK ] <url> |
   dns [ NETWORK ] <domain> |
   proxy <url> |
   list [ networks ] |
   stats [ sockets | traffic ]
 ]
 where NETWORK := [ wifi | eth | ethernet | cell | cellular | vpn ]

ping:           check the reachability of a host or IP address.
http:           do a GET request to an URL and print the response header.
dns:            perform a DNS lookup of a domain name.
proxy:          resolve the current proxy configuration for a given URL.
list networks:  show properties of all networks connected in Android.
stats sockets:  show TCP connect and DNS statistics by Android Apps.
stats traffic:  show traffic packet statistics by Android Apps.

If NETWORK is not specified, the default network is used.
autest [--scheduled]  
 Trigger an auto-update against a **test** update server.

 WARNING: This may update to an untested version of ChromeOS which was never
 intended for end users!

 The --scheduled option fakes a scheduled update.

authpolicy_debug <level>  
 Set authpolicy daemon debugging level.
 <level> can be 0 (quiet), 1 (taciturn), 2 (chatty), or 3 (verbose).

battery_firmware <info>  
 info   : Query battery info.

battery_test [<test length>]  
 Tests battery discharge rate for given number of seconds. Without an argument,
 defaults to 300 seconds.


 Enters a Bluetooth debugging console.
builtin_corpssh
 [Deprecated] Enable or disable CorpSSH support for the built-in gnubby.
 This is now always enabled, and the command will be removed soon.

ccd_pass
 When prompted, set or clear CCD password (use the word 'clear' to clear
 the password).

chaps_debug [start|stop|<log_level>]  
 Sets the chapsd logging level.  No arguments will start verbose logging.

connectivity   
 Shows connectivity status.  "connectivity help" for more details

cras [ enable <flag> | disable <flag> | telephony <event> [arg] ]  
 Interact with CRAS(CrOS Audio Server) to set flags or trigger events.

 Subcommands:
   enable/disable <flag>:
     Enable or disable feature flag inside CRAS.
     Available flags:
     - wbs: Turn on this flag to make CRAS try to use wideband speech mode in
       Bluetooth HFP, if both the Bluetooth controller and peripheral supports
       this feature.
     - noise_cancellation: Turn on this flag to enable noise cancellation
       processing to input devices who support noise cancellation.

     Notice: The flag changes made through this command do not persist after
     reboot.

   telephony <event> [args...]:
     Trigger a telephony event pass to CRAS in Bluetooth HFP.

     Available events:
     - IncomingCall <PhoneNumber>: Make a call from external line.
         Ex: $ cras telephony IncomingCall 12345678
     - AnswerCall: Answer the call.
     - TerminateCall: Terminate the call.
     - SetDialNumber [DailNumber]: Set the last dialed number recorded. Clear
       the recorded number if no DailNumber is provided.
     - SetBatteryLevel <BatteryLevel>: Set and transfer the battery level to
       HF. The BatteryLevel should range from 0 to 5.
     - SetSignalStrength <SignalStrength>: Set and transfer the signal strength
       to HF. The SignalStrength should range from 0 to 5.
     - SetServiceAvailability <0/1>: Set if the service is available or not.
     - SetCallheld <CallHeldIndicator>: Set the callheld indicator.
       CallHeldIndicator:
         0 = No calls held
         1 = Call is placed on hold or active/held calls swapped
         (The AG has both an active AND a held call)
         2 = Call on hold, no active call
     - SetCallsetup <CallSetupIndicator>: Set the callsetup indicator.
       CallSetupIndicator:
         0 = No call setup in progress
         1 = Incoming call setup in progress
         2 = Outgoing call setup in dialing state
         3 = Outgoing call setup in alerting state
     - SetCall <CallIndicator>: Set the call indicator.
       CallIndicator:
         0 = No call (held or active)
         1 = Call is present (active or held)

diag
Usage: [list|routine]

display_debug
 A tool to assist with collecting logs when reproducing display related issues.

 Subcommands:
   trace_start Usage: display_debug trace_start
     Increase size and verbosity of logging through drm_trace.

   trace_stop Usage: display_debug trace_stop
     Reset size and verbosity of logging through drm_trace to defaults.

   trace_annotate Usage: display_debug trace_annotate <message>
     Append |message| to the drm_trace log.

   diagnose Usage: display_debug diagnose
     Give a sequence of steps to assist in debugging display issues.

dlc_install <dlc-id>
 Trigger a DLC installation against a **test** update server.

The **test** update server will serve signed DLC payloads which will only
successfully install if signed and verifiable. Otherwise, installations will
fail. The magical string 'autest' is passed into update_engine during this
installation, which will make requests against QA Omaha server and not the
production Omaha server.

WARNING: This may install an untested version of the DLC which was never
intended for end users!

Usage: dmesg [options]
       -d, --show_delta
               Display the timestamp and the time delta
           spent between messages
       -H, --human
               Enable human-readable output.
       -k, --kernel
               Print kernel messages.
       -L, --color
               Colorize the output.
       -p, --force-prefix
               Add facility, level or timestamp
           information to each line of a multi-line message.
       -r, --raw
               Print the raw message buffer.
       -T, --ctime
               Print human-readable timestamps.
       -t, --notime
               Do not print kernel's timestamps.
       -u, --userspace
               Print userspace messages.
       -x, --decode
               Decode facility and level (priority) numbers
           to human-readable prefixes.
dump_emk   
 Show the EMK (Enterprise Machine Key).

enroll_status [--mode] [--domain] [--realm] [--user]  
 Displays device enrollment information.

evtest   
 Run evtest in safe mode.

help: unknown command 'exit'
ff_debug
Usage: ff_debug [<tag_expression>]|[--reset]|[--help]|[--list_valid_tags]|[--level <level>]

 ff_debug adds and removes debug tags for flimflam.
 Current debug settings are displayed if no parameters are provided

 <tag_expression> is defined in boolean notation using <debug_tag> separated
   by an operator [+-], where + and - imply adding and removing of the tag immediately
   following the operator. An expression beginning with either operators [+-]
   takes the existing tags and modifies them appropriately.  Otherwise, the existing tags
   are replaced by those specified in the command.

   <debug_tag> can be listed using the --list_valid_tags

   e.g.: ff_debug network+wifi
     Sets debug tags to network and wifi
   e.g.: ff_debug +network-service
     Adds network and removes service tags from the existing debug settings

 --list_valid_tags : Displays all valid tags

 --level: Displays or sets current debug level for logging
   All messages at, or above, the current log level are logged. Normal log
   levels range from 4 (LOG_FATAL) to 0 (LOG_INFO). In addition VERBOSE log
   levels are available starting at -1.

   e.g.: ff_debug --level 4
     Logs only FATAL messages.
   e.g.: ff_debug --level 0
     Logs INFO, WARNING, ERROR, ERROR_REPORT, and FATAL messages.
   e.g.: ff_debug --level -4
     Logs everything that "--level 0" does, plus SLOG(<tag>, <n>) messages,
     where <tag> has been enabled for logging, and <n> <= 4. (NOTE: you must
     negate SLOG levels for use with ff_debug. In this example, SLOG(<tag>, 4)
     maps to "--level -4".)

 --reset : Removes all tagging

 --help : Displays this output

free [options]  
 Display free/used memory info

gesture_prop [ devices | list <device ID> | get <device ID> <property name> | set <device ID> <property name> <value> ]  
 Read and change gesture properties for attached input devices. The "Enable
 gesture properties D-Bus service" flag must be enabled for this command to
 work.

 For more details, see:
 https://chromium.googlesource.com/chromiumos/platform/gestures/+/HEAD/docs/gesture_properties.md

 Subcommands:
   devices, devs:
     List the devices managed by the gestures library, with their numeric IDs.

   list <device ID>:
     List the properties for the device with the given ID.

   get <device ID> <property name>:
     Get the current value of a property. Property names containing spaces
     should be quoted. For example:
     $ gesture_prop get 12 "Mouse CPI"

   set <device ID> <property name> <value>:
     Set the value of a property. Values use the same syntax as dbus-send
     (https://dbus.freedesktop.org/doc/dbus-send.1.html#description), and
     should either be arrays or strings. For example:
     $ gesture_prop set 12 "Mouse CPI" array:double:500
     $ gesture_prop set 12 "Log Path" string:/tmp/foo.txt

help [command]  
 Display general help, or details for a specific command.

help_advanced   
 Display the help for more advanced commands, mainly used for debugging.

ipaddrs [-4] [-6]  
 Display IP addresses.
 -4: Only show IPv4 addresses.
 -6: Only show IPv6 addresses.

live_in_a_coal_mine
 Switch to the canary channel.

 WARNING: This is bleeding edge software and is often more buggy than the dev
 channel.  Please do not use this unless you are a developer.  This is often
 updated daily and has only passed automated tests -- the QA level is low!

 This channel may not always boot reliably or have a functioning auto update
 mechanism. Do not do this unless you are prepared to recover your ChromeOS
 device, please be familiar with this article first:
 https://support.google.com/chromebook/answer/1080595

meminfo   
 Display detailed memory statistics

memory_test   
 Performs extensive memory testing on the available free memory.

modem <command> [args...]  
 Interact with the 3G modem. Run "modem help" for detailed help.

network_diag
This command is disabled pending removal.
Please see https://issuetracker.google.com/267537630

p2p_update [enable|disable] [--num-connections] [--show-peers]  
 Enables or disables the peer-to-peer (P2P) sharing of updates over the local
 network. This will both attempt to get updates from other peers in the
 network and share the downloaded updates with them. Run this command without
 arguments to see the current state.  Additional switches will display number
 of connections and P2P peers.

Usage: packet_capture [options]
       --device        <device>
       --max-size      <max size in MiB>
       --frequency     <frequency>
       --ht-location   <above|below>
       --vht-width     <80|160>
       --monitor-connection-on         <monitored_device>

Start packet capture.  Start a device-based capture on <device>,
 or do an over-the-air capture on <frequency> with an optionally
 provided HT channel location or VHT channel width.  An over-the-air
 capture can also be initiated using the channel parameters of a
 currently connected <monitored_device>.  Note that over-the-air
 captures are not available with all 802.11 devices. Set <max_size>
 to stop the packet capture if the output .pcap file size exceedes this
 limit. Only device-based capture options (--device and --max-size) are
 available in verified mode. Switch to developer mode to use other
 options.
ping [-4] [-6] [-c count] [-i interval] [-n] [-s packetsize] [-W waittime] <destination>  
 Send ICMP ECHO_REQUEST packets to a network host.  If <destination> is "gw"
 then the next hop gateway for the default route is used.
 Default is to use IPv4 [-4] rather than IPv6 [-6] addresses.

printscan_debug
 A tool to assist with collecting logs when reproducing printing and scanning related issues.

 Subcommands:
   start Usage: printscan_debug start [all|scanning|printing]
     Start collecting printscan debug logs.

   stop Usage: printscan_debug stop
     Stop collecting printscan debug logs.

rlz < status | enable | disable >  
 Enable or disable RLZ.  See this site for details:
 http://dev.chromium.org/developers/design-documents/extensions/proposed-changes/apis-under-development/rlz-api

rollback
 
 Attempt to rollback to the previous update cached on your system. Only
 available on non-stable channels and non-enterprise enrolled devices.

 Please note that this will powerwash your device.

route [-4] [-6] [--all]  
 Display the routing tables.
 -4: Only show IPv4 routes.
 -6: Only show IPv6 routes.
 --all: Show all routing tables.

set_apn [-c] [-n <network-id>] [-u <username>] [-p <password>] <apn>  
 Set the APN to use when connecting to the network specified by <network-id>.
 If <network-id> is not specified, use the network-id of the currently
 registered network.

 The -c option clears the APN to be used, so that the default APN will be used
 instead.

set_arpgw <true | false>  
 Turn on extra network state checking to make sure the default gateway
 is reachable.

set_cellular_ppp [-c] [-u <username>] [-p <password>]  
 Set the PPP username and/or password for an existing cellular connection.
 If neither -u nor -p is provided, show the existing PPP username for
 the cellular connection.

 The -c option clears any existing PPP username and PPP password for an
 existing cellular connection.

set_time <time string>
 Sets the system time if the the system has been unable to get it from the
 network. The <time string> uses the format of the GNU coreutils date command.

set_wake_on_lan <true | false>  
 Enable or disable Wake on LAN for Ethernet devices.  This command takes
 effect after re-connecting to Ethernet and is not persistent across system
 restarts.

shell
 Open a command line shell.

storage_test_1   
 Performs a short offline SMART test.

storage_test_2   
 Performs an extensive readability test.

swap [ enable <size (MB)> | disable | start | stop | status ]  
 Change kernel memory manager parameters
 (FOR EXPERIMENTS ONLY --- USE AT OWN RISK)

 "swap status" (also "swap" with no arguments) shows the values of various
 memory manager parameters and related statistics.

 The enable/disable options enable or disable compressed swap (zram)
 persistently across reboots, and take effect at the next boot.  The enable
 option takes the size of the swap area (in megabytes before compression).
 If the size is omitted, the factory default is chosen.

 The start/stop options turn swap on/off immediately, but leave the settings
 alone, so that the original behavior is restored at the next boot.

 WARNING: if swap is in use, turning it off can cause the system to
 temporarily hang while the kernel frees up memory.  This can take
 a long time to finish.

sync   
 Run the sync command

syslog <message>  
 Logs a message to syslog (the system log daemon).

systrace [<start | stop | status>]  
 Start/stop system tracing.  Turning tracing off will generate a trace
 log file in the Downloads directory with all the events collected
 since the last time tracing was enabled.  One can control the events
 collected by specifying categories after "start"; e.g. "start gfx"
 will collect only graphics-related system events.  "systrace status"
 (or just "systrace") will display the current state of tracing, including
 the set of events being traced.

time_info   
 Returns the current synchronization state for the time service.

top   
 Run top.

tracepath [-4] [-6] [-n] <destination>[/port]  
 Trace the path/route to a network host.
 Default is to trace IPv4 [-4] rather than IPv6 [-6] targets.

u2f_flags <u2f | g2f>[, user_keys, verbose]  

 ### IMPORTANT: The U2F feature is experimental and not suitable for
 ### general production use in its current form. The current
 ### implementation is still in flux and some features (including
 ### security-relevant ones) are still missing. You are welcome to
 ### play with this, but use at your own risk. You have been warned.

 Set flags to override the second-factor authentication daemon configuration.
 u2f: Always enable the standard U2F mode even if not set in device policy.
 g2f: Always enable the U2F mode plus some additional extensions.
 user_keys: Enable user-specific keys.
 verbose: Increase the daemon logging verbosity in /var/log/messages.

uname [-a|-s|-n|-r|-v|-m|-p|-i|-o]  
 Display system info

upload_crashes   
 Uploads available crash reports to the crash server.

upload_devcoredumps [enable|disable]  
 Enable or disable the upload of devcoredump reports.

uptime   
 Display uptime/load info

verify_ro
 Verify AP and EC RO firmware on a ChromeOS device connected over SuzyQ
 cable, if supported by the device.

USAGE: vmc
  [ start [--enable-gpu] [--enable-dgpu-passthrough] [--enable-vulkan] [--enable-big-gl] [--enable-virtgpu-native-context] [--enable-audio-capture] [--untrusted] [--extra-disk PATH] [--kernel PATH] [--initrd PATH] [--writable-rootfs] [--kernel-param PARAM] [--bios PATH] [--timeout PARAM] [--oem-string STRING] <name> |
    stop <name> |
    launch <name> |
    create [-p] [--size SIZE] <name> [<source media> [<removable storage name>]] [-- additional parameters] |
    create-extra-disk --size SIZE [--removable-media] <host disk path> |
    adjust <name> <operation> [additional parameters] |
    destroy [-y] <name> |
    disk-op-status <command UUID> |
    export [-d] [-f] <vm name> <file name> [<removable storage name>] |
    import [-p] <vm name> <file name> [<removable storage name>] |
    resize <vm name> <size> |
    list |
    logs <vm name> |
    share <vm name> <path> |
    unshare <vm name> <path> |
    container <vm name> <container name> [ (<image server> <image alias>) | (<rootfs path> <metadata path>)] [--privileged <true/false>] [--timeout PARAM] |
    update-container-devices <vm_name> <container_name> (<vm device>:<enable/disable>)... |
    usb-attach <vm name> <bus>:<device> [<container name>] |
    usb-detach <vm name> <port> |
    usb-list <vm name> |
    pvm.send-problem-report [-n <vm name>] [-e <reporter's email>] <description of the problem> |
    --help | -h ]

vmstat [-a|-d|-f|-m|-n|-s|-w] [delay [count]]  
 Report virtual memory statistics

vsh <vm_name> [<container_name>]  
 Connect to a shell inside the VM <vm_name>, or to a shell inside the container
 <container_name> within the VM <vm_name>.

wifi_fw_dump   
 Manually trigger a WiFi firmware dump. This command will currently only
 complete successfully if the intel-wifi-fw-dumper package is present on the
 device with USE=iwlwifi_dump enabled.

wifi_power_save < status | enable | disable >  
 Enable or disable WiFi power save mode.  This command is not persistent across
 system restarts.

wireguard wireguard <cmd> [<args>]

Available subcommands:

list
   Show all configured WireGuard services.
show <name>
   Show the WireGuard service with name <name>.
new <name>
   Create a new WireGuard service with name <name>.
del <name>
   Delete the configured WireGuard service with name <name>.
set <name> [local-ip <ip1>[,<ip2>]] [private-key] [mtu <mtu>] [dns <ip1>[,<ip2>]...]
          [peer <base64-public-key> [remove]
                                    [endpoint <hostname>/<ip>:<port>]
                                    [preshared-key]
                                    [allowed-ips <ip1>/<cidr1>[,<ip2>/<cidr2>]...]
                                    [persistent-keepalive <interval seconds>] ]...
   Configure properties for the WireGuard service with name <name>. Most options should
   have the same meaning and usage as in `wireguard-tools` (and `wg-quick`). Exceptions
   are:
   - At most one IPv4 address and one IPv6 address is supported for `local-ip`.
   - If `dns` is not set, it will be defaulted to "8.8.8.8,8.8.4.4".
   - If `mtu` is not set, it will be determined automatically. Set it to 0 to reset the
     existing value.
   - `endpoint` must be set before using `connect` command.
   - `private-key` and `preshared-key` take no parameters. If they are used, this command
     will prompt you to change the key (or remove the key) via stdin, to avoid leaving
     them in the history of shell.
connect <name>
   Connect to the configured WireGuard service with name <name>.
disconnect <name>
   Disconnect from the configured WireGuard service with name <name>.

 Utility to configure and control a WireGuard VPN service