MertcanGokgoz

System Info Concept

Dec 20th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Uptime

cut -d. -f1 /proc/uptime

days = /60/60/24
hours = /60/60%24
mins = /60%60
secs = %60

Network Stat

ls /sys/class/net
cat /sys/class/net/eth0/statistics/rx_bytes
cat /sys/class/net/eth0/statistics/tx_bytes

tbps = tx[1] - tx[0]
rbps = rx[1] - rx[0]

(rbps8)/10000000
(tbps
8)/10000000


SNMP Network in: 1.3.6.1.2.1.31.1.1.1.10.2
SNMP Network out: 1.3.6.1.2.1.31.1.1.1.6.2

CPU Info

cat /proc/cpuinfo # model name, cpu mHZ, cache size

CPU Load

CPU cat /proc/loadavg
Core_num grep -P '^processor' /proc/cpuinfo|wc -l

Hesaplama
(cpu load/core_num +1)*100/2

Get CPU Core

grep -P '^processor' /proc/cpuinfo|wc -l

Service Enable & Disable

ls /etc/systemd/system/multi-user.target.wants/%s.service

Process Exists

ps axo user:20,pid,pcpu,pmem,vsz,rss,tty,stat,start,time,comm,cmd|grep root | grep -iE nginx | grep -v grep

Add Comment
Please, Sign In to add comment