Commnads in Linux

  1. ls
  2. top
    1. 常用实例:
  3. mount

ls

top

  • CPU
    • us: user cpu time (or) % CPU time spent in user space
    • sy: system cpu time (or) % CPU time spent in kernel space
    • ni: user nice cpu time (or) % CPU time spent on low priority processes
    • id: idle cpu time (or) % CPU time spent idle
    • wa: io wait cpu time (or) % CPU time spent in wait (on disk)
    • hi: hardware irq (or) % CPU time spent servicing/handling hardware interrupts
    • si: software irq (or) % CPU time spent servicing/handling software interrupts
    • st: steal time - - % CPU time in involuntary wait by virtual cpu while hypervisor is servicing another processor (or) % CPU time stolen from a virtual machine
  • top
    • PID
    • USER
    • PR: 优先级,数值越小优先级越高(不可以被top修改)
    • NI:优先级,数值越小优先级越高(可以被top修改)
    • VIRT: 使用的虚拟内存大小(KB)
    • RES: 使用的物理内存大小(KB)
    • SHR: 使用的共享内存大小(KB)
    • %CPU
    • %MEM: 占用的内存百分比
    • TIME+: 占用的CPU时间
    • COMMAND

常用实例:

  1. top -p 999 # 只查看PID为999的进程

mount

Ubuntu硬盘挂载

1
mount -t ext4 /dev/sdc /data/sdc # -t 表明type

挂载旧硬盘时有可能会出现挂载失败错误,这个时候一般搭配硬盘格式化使用
1
mkfs -t ext4 /dev/sdc


转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。