top
top - 14:45:52 up 29 min, 1 user, load average: 0.10, 0.09, 0.06 Tasks: 56 total, 1 running, 55 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1019600k total, 393756k used, 625844k free, 11136k buffers Swap: 0k total, 0k used, 0k free, 316748k cached PID %MEM VIRT SWAP RES CODE DATA SHR nFLT nDRT S PR NI %CPU COMMAND 832 1.3 32364 18m 12m 896 11m 1688 1 0 S 20 0 0.0 bash 820 0.4 89456 83m 4008 488 948 3040 12 0 S 20 0 0.0 sshd 812 0.3 49948 46m 2828 488 616 2216 0 0 S 20 0 0.0 sshd 1 0.2 24192 21m 2108 152 868 1300 23 0 S 20 0 0.0 init 400 0.1 243m 242m 1420 344 216m 1084 0 0 S 20 0 0.0 rsyslogd
sudo apt-get install htop
htop
CPU[| 0.7%] Tasks: 21, 3 thr; 1 running Mem[||||||||||||| 64/995MB] Load average: 0.00 0.02 0.05 Swp[ 0/0MB] Uptime: 00:37:37 PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 2752 root 20 0 25660 1876 1364 R 0.0 0.2 0:00.06 htop 1 root 20 0 24192 2108 1300 S 0.0 0.2 0:00.55 /sbin/init 312 root 20 0 17224 640 444 S 0.0 0.1 0:00.04 upstart-udev-brid 314 root 20 0 21592 1360 760 S 0.0 0.1 0:00.04 /sbin/udevd --dae 394 messagebu 20 0 23808 688 436 S 0.0 0.1 0:00.01 dbus-daemon --sys 401 syslog 20 0 243M 1420 1084 S 0.0 0.1 0:00.07 rsyslogd -c5 402 syslog 20 0 243M 1420 1084 S 0.0 0.1 0:00.00 rsyslogd -c5
sudo apt-get install nethogs
nethogs
NetHogs version 0.8.0 PID USER PROGRAM DEV SENT RECEIVED 3379 root /usr/sbin/sshd eth0 0.485 0.182 KB/sec 820 root sshd: root@pts/0 eth0 0.427 0.052 KB/sec ? root unknown TCP 0.000 0.000 KB/sec TOTAL 0.912 0.233 KB/sec
sudo apt-get install iptraf
sudo iptraf
??????????????????????????????????? ? IP traffic monitor ? ? General interface statistics ? ? Detailed interface statistics ? ? Statistical breakdowns... ? ? LAN station monitor ? ??????????????????????????????????? ? Filters... ? ??????????????????????????????????? ? Configure... ? ??????????????????????????????????? ? Exit ? ???????????????????????????????????
IPTraf ? TCP Connections (Source Host:Port) ?????????? Packets ??? Bytes Flags Iface ? ??192.241.xxx.xxx:22 > 369 82420 -PA- eth0 ? ??72.43.xxx.xxx:49488 > 381 19860 --A- eth0 ? ? ? ? ?
TCP Connections (Source Host:Port) ?????????? Packets ??? Bytes Flags Iface ? ??192.241.xxx.xxx:ssh > 151 34924 -PA- eth0 ? ??rrcs-72-43-xxx-xxx.nyc.biz.rr.co:49488 > 155 8108 --A- eth0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TCP: 1 entries ???????????????????????????????????????????????? Active ?? ???????????????????????????????????????????????????????????????????????????????? ? UDP (72 bytes) from 192.241.xxx.xxx:43463 to 8.8.8.8:domain on eth0 ? ? UDP (66 bytes) from 192.241.xxx.xxx:53140 to 8.8.8.8:domain on eth0 ? ? UDP (135 bytes) from 8.8.8.8:domain to 192.241.xxx.xxx:41429 on eth0 ? ? UDP (119 bytes) from 8.8.8.8:domain to 192.241.xxx.xxx:43463 on eth0 ? ? UDP (110 bytes) from google-public-dns-a.googl:domain to 192.241.xxx.xxx:531 ?
netstat
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 192.241.187.204:ssh ip223.hichina.com:50324 ESTABLISHED tcp 0 0 192.241.187.204:ssh rrcs-72-43-115-18:50615 ESTABLISHED Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path unix 5 [ ] DGRAM 6559 /dev/log unix 3 [ ] STREAM CONNECTED 9386 unix 3 [ ] STREAM CONNECTED 9385 . . .
netstat -a
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:ssh *:* LISTEN tcp 0 0 192.241.187.204:ssh rrcs-72-43-115-18:50615 ESTABLISHED tcp6 0 0 [::]:ssh [::]:* LISTEN Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 6195 @/com/ubuntu/upstart unix 2 [ ACC ] STREAM LISTENING 7762 /var/run/acpid.socket unix 2 [ ACC ] STREAM LISTENING 6503 /var/run/dbus/system_bus_socket . . .
netstat -at
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:ssh *:* LISTEN tcp 0 0 192.241.187.204:ssh rrcs-72-43-115-18:50615 ESTABLISHED tcp6 0 0 [::]:ssh [::]:* LISTEN
netstat -s
Ip: 13500 total packets received 0 forwarded 0 incoming packets discarded 13500 incoming packets delivered 3078 requests sent out 16 dropped because of missing route Icmp: 41 ICMP messages received 0 input ICMP message failed. ICMP input histogram: echo requests: 1 echo replies: 40 . . .
df
Filesystem 1K-blocks Used Available Use% Mounted on /dev/vda 31383196 1228936 28581396 5% / udev 505152 4 505148 1% /dev tmpfs 203920 204 203716 1% /run none 5120 0 5120 0% /run/lock none 509800 0 509800 0% /run/shm
Filesystem Size Used Avail Use% Mounted on /dev/vda 30G 1.2G 28G 5% / udev 494M 4.0K 494M 1% /dev tmpfs 200M 204K 199M 1% /run none 5.0M 0 5.0M 0% /run/lock none 498M 0 498M 0% /run/shm
df -h --total
Filesystem Size Used Avail Use% Mounted on /dev/vda 30G 1.2G 28G 5% / udev 494M 4.0K 494M 1% /dev tmpfs 200M 204K 199M 1% /run none 5.0M 0 5.0M 0% /run/lock none 498M 0 498M 0% /run/shm total 32G 1.2G 29G 4%
du
4 ./.cache 8 ./.ssh 28 .
du -h
4.0K ./.cache 8.0K ./.ssh 28K .
du -a
0 ./.cache/motd.legal-displayed 4 ./.cache 4 ./.ssh/authorized_keys 8 ./.ssh 4 ./.profile 4 ./.bashrc 4 ./.bash_history 28 .
du -c
4 ./.cache 8 ./.ssh 28 . 28 total
du -s
28 .
sudo apt-get install pydf
pydf -a
dev/vda 30G 1200M 27G 3.9 [........] / udev 493M 4096B 493M 0.0 [........] /dev devpts 0 0 0 - [........] /dev/pts proc 0 0 0 - [........] /proc tmpfs 199M 204k 199M 0.1 [........] /run none 5120k 0 5120k 0.0 [........] /run/lock none 498M 0 498M 0.0 [........] /run/shm . . .
sudo apt-get install ncdu
ncdu
--- /root ---------------------------------------------------------------------- 8.0KiB [##########] /.ssh 4.0KiB [##### ] /.cache 4.0KiB [##### ] .bashrc 4.0KiB [##### ] .profile 4.0KiB [##### ] .bash_history
free
total used free shared buffers cached Mem: 507620 408172 99448 0 123672 248224 -/+ buffers/cache: 36276 471344 Swap: 0 0 0
free -m
total used free shared buffers cached Mem: 495 398 97 0 120 242 -/+ buffers/cache: 35 460 Swap: 0 0 0
vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 0 99340 123712 248296 0 0 0 1 9 3 0 0 100 0
vmstat -S M
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 0 96 120 242 0 0 0 1 9 3 0 0 100 0
vmstat -s -S M
495 M total memory 398 M used memory 252 M active memory 119 M inactive memory 96 M free memory 120 M buffer memory 242 M swap cache 0 M total swap 0 M used swap 0 M free swap . . .
vmstat -m -S M
Cache Num Total Size Pages ext4_groupinfo_4k 195 195 104 39 UDPLITEv6 0 0 768 10 UDPv6 10 10 768 10 tw_sock_TCPv6 0 0 256 16 TCPv6 11 11 1408 11 kcopyd_job 0 0 2344 13 dm_uevent 0 0 2464 13 bsg_cmd 0 0 288 14 . . .
Article ID: 279
Created On: Sat, Jan 4, 2014 at 4:57 AM
Last Updated On: Sat, Jan 4, 2014 at 4:57 AM
Authored by: ASPHostServer Administrator [asphostserver@gmail.com]
Online URL: http://faq.asphosthelpdesk.com/article.php?id=279