Shell: displays the basic system information script and shell basic information script.
#! /Bin/bashecho "IP:" ifconfig | grep "inet addr" | grep-v 127.0.0.1 | awk '{print $2}' | awk-F ': ''{print $2} 'echo" Product Name: "dmidecode | grep Nameecho" CPU Info: "dmidecode | grep-I cpu | grep-I version | awk-F ': ''{print $2} 'echo" Disk Info: "fdisk-l | grep" Disk "| awk-F','' {print "", $1} 'echo "Network Info:" lspci | grep Ethernetecho "Memory Info: "dmidecode | grep-P-A5" Memory \ s + Device "| grep Size | grep-v Noecho" Memory number: "'dmidecode | grep-P-A5" Memory \ s + Device "| grep Size | grep-v No | wc-l'
How to compile a shell script to display the system running time
Uptime | awk '{print $3 }'
View how long the shell script runs
Real: the total time consumed by the command, including user, sys, io Wait, time slice switch wait, and so on.
User: indicates the CPU time consumed by the command in user mode, that is, the CPU time consumed outside the kernel, excluding the IO wait time.
Sys: indicates the CPU time consumed by the command in the kernel, excluding I/O and time slice switching.
What the landlord needs is the value of real.