Script CentOS RedHat Mengecek Proses yang Sedang Berjalan (task manager)
ps aux
[root@centos ~]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.3 46192 6496 ? Ss May08 0:05 /usr/lib/systemd/systemd --system --deserialize 17
root 2 0.0 0.0 0 0 ? S May08 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S May08 0:00 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< May08 0:00 [kworker/0:0H]
root 7 0.0 0.0 0 0 ? S May08 0:00 [migration/0]
root 8 0.0 0.0 0 0 ? S May08 0:00 [rcu_bh]
root 9 0.0 0.0 0 0 ? R May08 0:02 [rcu_sched]
root 10 0.0 0.0 0 0 ? S< May08 0:00 [lru-add-drain]
root 11 0.0 0.0 0 0 ? S May08 0:00 [watchdog/0]
root 13 0.0 0.0 0 0 ? S May08 0:00 [kdevtmpfs]
root 14 0.0 0.0 0 0 ? S< May08 0:00 [netns]
root 15 0.0 0.0 0 0 ? S May08 0:00 [khungtaskd]
root 16 0.0 0.0 0 0 ? S< May08 0:00 [writeback]
root 17 0.0 0.0 0 0 ? S< May08 0:00 [kintegrityd]
root 18 0.0 0.0 0 0 ? S< May08 0:00 [bioset]
root 19 0.0 0.0 0 0 ? S< May08 0:00 [bioset]
root 20 0.0 0.0 0 0 ? S< May08 0:00 [bioset]
root 21 0.0 0.0 0 0 ? S< May08 0:00 [kblockd]
root 22 0.0 0.0 0 0 ? S< May08 0:00 [md]
root 23 0.0 0.0 0 0 ? S< May08 0:00 [edac-poller]
root 24 0.0 0.0 0 0 ? S< May08 0:00 [watchdogd]
root 30 0.0 0.0 0 0 ? S May08 0:00 [kswapd0]
root 31 0.0 0.0 0 0 ? SN May08 0:00 [ksmd]
root 32 0.0 0.0 0 0 ? SN May08 0:00 [khugepaged]
root 33 0.0 0.0 0 0 ? S< May08 0:00 [crypto]
root 41 0.0 0.0 0 0 ? S< May08 0:00 [kthrotld]
root 42 0.0 0.0 0 0 ? S May08 0:00 [kworker/u2:1]
root 43 0.0 0.0 0 0 ? S< May08 0:00 [kmpath_rdacd]
top - 10:32:50 up 1 day, 17:58, 2 users, load average: 0.00, 0.01, 0.05
Tasks: 104 total, 1 running, 103 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 1882620 total, 1031720 free, 148580 used, 702320 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 1490816 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 46192 6496 3956 S 0.0 0.3 0:05.37 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.24 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root 20 0 0 0 0 S 0.0 0.0 0:02.36 rcu_sched
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-drain
11 root rt 0 0 0 0 S 0.0 0.0 0:00.30 watchdog/0
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
14 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
15 root 20 0 0 0 0 S 0.0 0.0 0:00.08 khungtaskd
16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
17 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
18 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
20 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
21 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
22 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md
23 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 edac-poller
24 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 watchdogd
30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0
31 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
netstat -tapn
[root@centos ~]# netstat -tapn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 5297/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5604/master
tcp 0 64 192.168.88.100:22 192.168.88.12:59758 ESTABLISHED 16363/sshd: root@pt
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::22 :::* LISTEN 5297/sshd
tcp6 0 0 ::1:25 :::* LISTEN 5604/master
netstat -tapn | grep sshd
[root@centos ~]# netstat -tapn | grep sshd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 5297/sshd
tcp 0 64 192.168.88.100:22 192.168.88.12:59758 ESTABLISHED 16363/sshd: root@pt
tcp6 0 0 :::22 :::* LISTEN 5297/sshd
[root@centos ~]#
netstat -tapn | grep 22
[root@centos ~]# netstat -tapn | grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 5297/sshd
tcp 0 64 192.168.88.100:22 192.168.88.12:59758 ESTABLISHED 16363/sshd: root@pt
tcp6 0 0 :::22 :::* LISTEN 5297/sshd
[root@centos ~]#
0 komentar