System information

CPU usage in percentage

$ HZ=` awk '/\\#define HZ/ { print $3}' /usr/include/asm-generic/param.h`; NUMCPUS=` grep ^proc /proc/cpuinfo |  wc -l`; FIRST=` cat /proc/stat |  awk '/^cpu / { print $5}'`;  sleep 1; SECOND=` cat /proc/stat |  awk '/^cpu / { print $5}'`; USED=` echo 4 k 100 $SECOND $FIRST - $NUMCPUS $HZ \\* / 100 \\* - p |  dc`;  echo ${USED}
copy
$ NUMCPUS=` grep ^proc /proc/cpuinfo |  wc -l`; FIRST=` cat /proc/stat |  awk '/^cpu / { print $5}'`;  sleep 1; SECOND=` cat /proc/stat |  awk '/^cpu / { print $5}'`; USED=` echo 2 k 100 $SECOND $FIRST - $NUMCPUS / - p |  dc`;  echo ${USED}%
copy

Laptop battery in percentage

$ max=$( grep 'last full capacity:' /proc/acpi/battery/BAT1/info| awk '{ print $4}') ; current=$( grep 'remaining capacity:' /proc/acpi/battery/BAT1/state| awk '{ print $3}'); percent=$( expr $current'00' / $max );  echo -e $percent
copy
upower -i $( upower -e |  grep BAT) |  grep --color=never -E percentage| xargscut -d' ' -f2| sed s/%//
copy
cat /sys/class/power_supply/BAT1/uevent |  awk '/POWER_SUPPLY_CAPACITY/ { print $1}' |  sed 's/POWER_SUPPLY_CAPACITY=//'
copy

Bluetooth MAC address

hciconfig -a |  awk '/BD Address:/ { print $3}'
copy

Bluetooth name

hciconfig -a |  awk '/Name:/ { print $2}'
copy

Network interfaces

ifconfig -a
copy
ip a
copy

Memory information

cat /proc/meminfo
copy

Info about the linux system

cat /proc/version
copy
uname -a
copy

PCI devices

lspci
copy

USB devices

lsusb
copy

Block devices (except RAM disks) in a tree-like format

lsblk
copy

Uptime of machine

uptime
copy

Disk usage info

df -k
copy

Bootlog info

cat /var/log/boot.log
copy

Show a small months calender

cal
copy
Copied to clipboard