System information

CPU usage in percentag

>_ 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| xargs| cut -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

Memory information

>_ cat /proc/meminfo
copy

Info about the linux system

>_ cat /proc/version
copy

PCI devices

>_ lspci
copy

USB devices

>_ lsusb
copy

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

>_ lsblk
copy

External ip

>_ curl ifconfig.me
copy
>_ dig +short myip.opendns.com @resolver1.opendns.com
copy
>_ netcat icanhazip.com 80 <<< $'GET / HTTP/1.1 Host: icanhazip.com ' | tail -n1
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
free 100$ digital ocean credit