查看系统版本
-基于ubuntu系统使用
uname -a
root@wadequ-ThinkPad-L13:/home/wadequ# uname -a
Linux wadequ-ThinkPad-L13 5.4.0-122-generic #138~18.04.1-Ubuntu SMP Fri Jun 24 14:14:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
-详细系统以及版本
···
root@wadequ-ThinkPad-L13:/home/wadequ# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
···
查看系统内存命令
- free -h
root@wadequ-ThinkPad-L13:/home/wadequ# free -h
总计 已用 空闲 共享 缓冲/缓存 可用
内存: 15G 4.9G 5.4G 1.4G 4.9G 8.7G
交换: 2.0G 0B 2.0G
当前内存进程使用情况
- top
···top - 14:36:41 up 2 days, 1:19, 1 user, load average: 0.85, 1.19, 1.41
任务: 470 total, 2 running, 399 sleeping, 0 stopped, 0 zombie
%Cpu(s): 6.4 us, 4.0 sy, 0.0 ni, 88.1 id, 0.0 wa, 0.0 hi, 1.4 si, 0.0 st
KiB Mem : 15996272 total, 5716624 free, 5138240 used, 5141408 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 9160800 avail Mem
进程ER PR NI VIRT RES SHR CPU %MEM TIME+ COMMAND
7254 root 20 0 982092 264436 53972 S 16.2 1.7 8:12.00 kube-apiserver --advertise-address=172.18.0.4 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-fil+
6237 root 20 0 2098056 82720 49516 S 8.3 0.5 6:30.57 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.+
6229 root 20 0 2392728 75424 48764 S 7.6 0.5 6:59.04 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.+
6228 root 20 0 2466460 74804 48180 S 5.0 0.5 6:32.83 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.+
6049 wadequ 9 -11 2123144 18228 13836 S 4.6 0.1 2:14.33 /usr/bin/pulseaudio --start --log-target=syslog
2870 wadequ 20 0 1007292 114800 88636 S 3.3 0.7 2:50.65 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
4056 wadequ 20 0 4133372 292556 152164 S 3.0 1.8 3:45.59 /usr/bin/gnome-shell
2920 root 20 0 4157796 96852 49700 S 2.3 0.6 0:06.49 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
26703 wadequ 20 0 614600 76520 57196 S 2.3 0.5 0:19.12 SecureCRT
58445 wadequ 20 0 28.648g 271720 138488 S 2.3 1.7 1:45.21 /opt/google/chrome/chrome --type=renderer --enable-crashpad --crashpad-handler-pid=10072 --enable-crash-reporter=dac+
7183 root 20 0 10.122g 59708 21860 S 2.0 0.4 2:40.74 etcd --advertise-client-urls=https://172.18.0.4:2379 --cert-file=/etc/kubernetes/pki/etcd/server.crt --client-cert-a+
1095 root 20 0 687608 20976 18104 S 1.7 0.1 2:06.13 /usr/local/sunlogin/bin/sunloginclient -m service
1078 message+ 20 0 51776 6396 3972 S 1.3 0.0 1:31.67 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
5878 root 20 0 2613792 71708 37996 S 1.3 0.4 1:17.06 /usr/local/bin/containerd
58235 wadequ 20 0 16.957g 72500 61536 S 1.3 0.5 0:35.88 /opt/google/chrome/chrome --type=utility --utility-sub-type=audio.mojom.AudioService --field-trial-handle=1173616075+
5779 root 20 0 1874872 65176 36968 S 1.0 0.4 0:53.27 /usr/local/bin/containerd
···
- 查看端口占用情况
···
活Internet连接 (服务器和已建立连接的)
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 771/rpcbind
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1310/nginx: master
tcp 0 0 127.0.0.1:37555 0.0.0.0:* LISTEN 4631/docker-proxy
tcp 0 0 127.0.0.1:16308 0.0.0.0:* LISTEN 1095/sunloginclient
tcp 0 0 0.0.0.0:8085 0.0.0.0:* LISTEN 1093/python
tcp 0 0 0.0.0.0:822 0.0.0.0:* LISTEN 1262/sshd
tcp 0 0 0.0.0.0:8087 0.0.0.0:* LISTEN 1093/python
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1131/cupsd
tcp 0 0 127.0.0.1:36600 0.0.0.0:* LISTEN 1346/IsaCtrl
tcp 0 0 127.0.0.1:44537 0.0.0.0:* LISTEN 1253/containerd
tcp 0 0 0.0.0.0:43833 0.0.0.0:* LISTEN 1095/sunloginclient
tcp 0 0 127.0.0.1:16090 0.0.0.0:* LISTEN 1067/oray_rundaemon
tcp 0 0 127.0.0.1:36443 0.0.0.0:* LISTEN 1346/IsaCtrl
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1310/nginx: master
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1336/mysqld
···
通过进程号查看相关程序
ps -ef|grep 1095
root@wadequ-ThinkPad-L13:/home/wadequ# ps -ef|grep 1095
root 1095 1067 0 9月30 ? 00:02:08 /usr/local/sunlogin/bin/sunloginclient -m service
root 107151 87901 0 14:38 pts/2 00:00:00 grep --color=auto 1095