[root@zlhpc ~]# date 2017年 02月 09日 星期四 03:20:45 CST
[root@zlhpc sysconfig]# date -s "2016-02-09 15:15:00" 2016年 02月 09日 星期二 15:15:00 CST [root@zlhpc sysconfig]# date 2016年 02月 09日 星期二 15:15:05 CST
[root@zlhpc sysconfig]# ntpdate -u ntp.api.bz 9 Feb 15:56:21 ntpdate[4132]: step time server 17.253.68.253 offset 31624839.558211 sec [root@zlhpc sysconfig]# date 2017年 02月 09日 星期四 15:56:27 CST
[root@zlhpc sysconfig]# hostname zlhpc
[root@zlhpc sysconfig]# vim /etc/hostname
[root@zlhpc /]# uname -a Linux zlhpc 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@zlhpc /]# cat /proc/version Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015 [root@zlhpc /]# cat /etc/issue S Kernel r on an m [root@zlhpc /]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.2.1511 (Core) Release: 7.2.1511 Codename: Core
[root@zlhpc /]# grep "model name" /proc/cpuinfo #查看cpu信息 model name : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz [root@zlhpc /]# more /proc/cpuinfo #查看cpu信息 processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz stepping : 3 microcode : 0x1e cpu MHz : 3591.678 cache size : 8192 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 [root@zlhpc /]# getconf LONG_BIT #查看cpu位数 64
[root@zlhpc home]# cat /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin operator:x:11:0:operator:/root:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin nobody:x:99:99:Nobody:/:/sbin/nologin avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin systemd-bus-proxy:x:999:997:systemd Bus Proxy:/:/sbin/nologin systemd-network:x:998:996:systemd Network Management:/:/sbin/nologin dbus:x:81:81:System message bus:/:/sbin/nologin polkitd:x:997:995:User for polkitd:/:/sbin/nologin tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin postfix:x:89:89::/var/spool/postfix:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin abrt:x:173:173::/etc/abrt:/sbin/nologin libstoragemgmt:x:996:994:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin chrony:x:995:993::/var/lib/chrony:/sbin/nologin ntp:x:38:38::/etc/ntp:/sbin/nologin tcpdump:x:72:72::/:/sbin/nologin rabbitmq:x:994:992:RabbitMQ messaging server:/var/lib/rabbitmq:/bin/bash nginx:x:993:991:Nginx web server:/var/lib/nginx:/sbin/nologin
root:x:0:0:root:/root:/bin/bash
[root@zlhpc home]# cat /etc/shells /bin/sh /bin/bash /sbin/nologin /usr/bin/sh /usr/bin/bash /usr/sbin/nologin /bin/tcsh /bin/csh
[root@zlhpc home]# cat /etc/shadow root:$6$zVDR2oO1Yg7alTbs$.70PPMYxg70k9BvLtjHdm94CDA1YWDRDI5NFzSfcmZF5WMESgIbLUdnqRjuVycg481Ny9rl//YzAFnXhurQi//::0:99999:7::: bin:*:16659:0:99999:7::: daemon:*:16659:0:99999:7::: adm:*:16659:0:99999:7::: lp:*:16659:0:99999:7::: sync:*:16659:0:99999:7::: shutdown:*:16659:0:99999:7::: halt:*:16659:0:99999:7::: mail:*:16659:0:99999:7::: operator:*:16659:0:99999:7::: games:*:16659:0:99999:7::: ftp:*:16659:0:99999:7::: nobody:*:16659:0:99999:7::: avahi-autoipd:!!:17203:::::: systemd-bus-proxy:!!:17203:::::: systemd-network:!!:17203:::::: dbus:!!:17203:::::: polkitd:!!:17203:::::: tss:!!:17203:::::: postfix:!!:17203:::::: sshd:!!:17203:::::: rpc:!!:17204:0:99999:7::: abrt:!!:17204:::::: libstoragemgmt:!!:17204:::::: chrony:!!:17204:::::: ntp:!!:17204:::::: tcpdump:!!:17204:::::: rabbitmq:!!:17204:::::: nginx:!!:17204::::::
[root@zlhpc ~]# wget http://download.redis.io/releases/redis-3.0.6.tar.gz
[root@zlhpc ~]# w3m www.baidu.com [root@zlhpc ~]# links www.baidu.com
[root@zlhpc ~]# ping www.baidu.com
[root@zlhpc ~]# mtr [root@zlhpc ~]# mtr -r -c 30 www.baidu.com #每秒发送数据包的数量是30 ,mtr -r -c 30 -s 1024 www.baidu.com #ping包的大小为1024个字节 Start: Sun Feb 12 18:01:09 2017 HOST: zlhpc Loss% Snt Last Avg Best Wrst StDev 1.|-- ??? 100.0 30 0.0 0.0 0.0 0.0 0.0 2.|-- 116.236.169.77 0.0% 30 4179. 9116. 4179. 11973 2051.2 3.|-- 124.74.124.165 0.0% 30 1.9 3.6 1.7 5.4 1.0 4.|-- 124.74.210.101 0.0% 30 4.1 4.5 2.4 6.1 1.0 5.|-- 59.43.77.141 0.0% 30 20.1 18.1 7.4 54.5 8.2 6.|-- 59.43.80.94 0.0% 30 4.3 6.0 2.7 24.3 3.6 7.|-- 202.97.26.2 86.7% 30 5.1 5.2 5.0 5.4 0.0 8.|-- 220.191.200.30 0.0% 30 5.9 5.5 5.1 7.0 0.3 9.|-- ??? 100.0 30 0.0 0.0 0.0 0.0 0.0 10.|-- 115.239.209.2 0.0% 30 6.8 7.1 6.6 8.0 0.0 11.|-- ??? 100.0 30 0.0 0.0 0.0 0.0 0.0 12.|-- 115.239.210.27 0.0% 30 6.1 6.5 5.6 11.7 1.4
[root@zlhpc ~]# host www.baidu.com www.baidu.com is an alias for www.a.shifen.com. www.a.shifen.com has address 115.239.211.112 www.a.shifen.com has address 115.239.210.27
[root@zlhpc ~]# ifconfig eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.18.8.190 netmask 255.255.255.0 broadcast 172.18.8.255 inet6 fe80::20c:29ff:feb5:d2d8 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:b5:d2:d8 txqueuelen 1000 (Ethernet) RX packets 10916 bytes 7044121 (6.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 7267 bytes 774719 (756.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 318 bytes 32844 (32.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 318 bytes 32844 (32.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@zlhpc ~]# ip link show #查看所有网络接口属性信息 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 link/ether 00:0c:29:b5:d2:d8 brd ff:ff:ff:ff:ff:ff [root@zlhpc ~]# ip -s link show #查看所有统计信息 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 RX: bytes packets errors dropped overrun mcast 32844 318 0 0 0 0 TX: bytes packets errors dropped carrier collsns 32844 318 0 0 0 0 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 link/ether 00:0c:29:b5:d2:d8 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 7050452 10988 0 0 0 0 TX: bytes packets errors dropped carrier collsns 780097 7309 0 0 0 0 [root@zlhpc ~]# ip addr show #查看网络信息 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:b5:d2:d8 brd ff:ff:ff:ff:ff:ff inet 172.18.8.190/24 brd 172.18.8.255 scope global dynamic eno16777736 valid_lft 83120sec preferred_lft 83120sec inet6 fe80::20c:29ff:feb5:d2d8/64 scope link valid_lft forever preferred_lft forever
[root@zlhpc ~]# ifdown eno16777736 [root@zlhpc ~]# ifup eno16777736
[root@zlhpc ~]# netstat -a --列出所有连接 Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:sunrpc 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN
[root@zlhpc ~]# netstat -at Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:sunrpc 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN
[root@zlhpc ~]# netstat -au Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State udp 0 0 0.0.0.0:18604 0.0.0.0:* udp 0 0 localhost:323 0.0.0.0:* udp 0 0 0.0.0.0:bootpc 0.0.0.0:* udp6 0 0 localhost:323 [::]:* udp6 0 0 [::]:53744 [::]:*
[root@zlhpc ~]# netstat -ant Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 52 172.18.8.190:22 172.18.8.196:51171 ESTABLISHED tcp 0 0 172.18.8.190:22 172.18.8.196:49639 ESTABLISHED
[root@zlhpc ~]# netstat -tnl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp6 0 0 :::111 :::* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:25 :::* LISTEN
[root@zlhpc ~]# netstat -nlpt Active Internet connections (only servers) 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 1538/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2094/master tcp6 0 0 :::111 :::* LISTEN 1/systemd tcp6 0 0 :::22 :::* LISTEN 1538/sshd tcp6 0 0 ::1:25 :::* LISTEN 2094/master
[root@zlhpc ~]# netstat -ltpe Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp 0 0 0.0.0.0:sunrpc 0.0.0.0:* LISTEN root 16299 1/systemd tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN root 21179 1538/sshd tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN root 22083 2094/master tcp6 0 0 [::]:sunrpc [::]:* LISTEN root 16298 1/systemd tcp6 0 0 [::]:ssh [::]:* LISTEN root 21189 1538/sshd tcp6 0 0 localhost:smtp [::]:* LISTEN root 22084 2094/master
[root@zlhpc ~]# netstat -s
Ip:
7872 total packets received
0 forwarded
0 incoming packets discarded
6932 incoming packets delivered
7284 requests sent out
60 dropped because of missing route
Icmp:
260 ICMP messages received
1 input ICMP message failed.
ICMP input histogram:
destination unreachable: 1
timeout in transit: 214
echo requests: 1
echo replies: 44
409 ICMP messages sent
0 ICMP messages failed
ICMP output histogram:
destination unreachable: 33
echo request: 12
echo replies:
... OUTPUT TRUNCATED ...
[root@zlhpc ~]# netstat -ct Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 52 zlhpc:ssh localhost:51171 ESTABLISHED tcp 0 0 zlhpc:ssh localhost:49639 ESTABLISHED
[root@zlhpc ~]# iftop interface: eno16777736 IP address is: 172.18.8.190 MAC address is: 00:0c:29:b5:d2:d8
[root@zlhpc ~]# df -h 文件系统 容量 已用 可用 已用% 挂载点 /dev/mapper/centos-root 18G 2.1G 16G 12% / devtmpfs 479M 0 479M 0% /dev tmpfs 489M 0 489M 0% /dev/shm tmpfs 489M 6.7M 483M 2% /run tmpfs 489M 0 489M 0% /sys/fs/cgroup /dev/sda1 497M 124M 374M 25% /boot tmpfs 98M 0 98M 0% /run/user/0
[root@zlhpc usr]# du --max-depth=1 -h 108M ./bin 46M ./sbin 390M ./lib 417M ./lib64 517M ./share 0 ./etc 0 ./games 35M ./include 78M ./libexec 51M ./local 55M ./src 1.7G .
[root@zlhpc usr]# tree -L 3 src #列出src层数为3以内的所有文件
src
├── debug
└── kernels
└── 3.10.0-514.6.1.el7.x86_64
├── arch
├── block
├── crypto
├── drivers
├── firmware
top - 21:32:45 up 6:31, 2 users, load average: 0.01, 0.02, 0.05 Tasks: 348 total, 2 running, 346 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.3 us, 0.3 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 1001332 total, 321616 free, 166176 used, 513540 buff/cache KiB Swap: 2097148 total, 2097148 free, 0 used. 596688 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3865 root 20 0 146296 2272 1452 R 0.7 0.2 0:00.62 top 1 root 20 0 126416 7184 2608 S 0.0 0.7 0:02.43 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.06 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 0:00.37 ksoftirqd/0 6 root 20 0 0 0 0 S 0.0 0.0 0:00.98 kworker/u256:0 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:00.00 rcuob/0 10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1 11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/2 12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/3 13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/4
[root@zlhpc ~]# free -h
total used free shared buff/cache available
Mem: 977M 138M 693M 6.6M 145M 690M
Swap: 2.0G 0B 2.0G
[root@zlhpc /]# more /proc/meminfo #查看内存信息 MemTotal: 1001332 kB MemFree: 322740 kB MemAvailable: 597536 kB Buffers: 1004 kB Cached: 261816 kB SwapCached: 0 kB Active: 169740 kB Inactive: 167476 kB Active(anon): 74780 kB Inactive(anon): 6452 kB Active(file): 94960 kB Inactive(file): 161024 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 2097148 kB SwapFree: 2097148 kB Dirty: 0 kB Writeback: 0 kB [root@zlhpc /]# grep MemTotal /proc/meminfo #查看内存信息 MemTotal: 1001332 kB
[root@zlhpc ~]# pstree -p
systemd(1)─┬─NetworkManager(978)─┬─dhclient(1320)
│ ├─{NetworkManager}(1051)
│ └─{NetworkManager}(1054)
├─abrt-watch-log(886)
├─abrtd(885)
├─agetty(906)
├─atd(900)
├─auditd(852)───{auditd}(871)
[root@zlhpc ~]# ps -aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.7 126420 7172 ? Ss 09:12 0:01 /usr/lib/systemd/system root 2 0.0 0.0 0 0 ? S 09:12 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S 09:12 0:00 [ksoftirqd/0] root 6 0.0 0.0 0 0 ? S 09:12 0:00 [kworker/u256:0] root 7 0.0 0.0 0 0 ? S 09:12 0:00 [migration/0] root 8 0.0 0.0 0 0 ? S 09:12 0:00 [rcu_bh] root 9 0.0 0.0 0 0 ? S 09:12 0:00 [rcuob/0]
[root@zlhpc ~]# ps -ef --标准格式显示进程 [root@zlhpc ~]# ps -aux --BSD格式显示进程
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有