Difference between revisions of "LinuxCommands"
From IGEP - ISEE Wiki
Manel Caro (talk | contribs) |
Manel Caro (talk | contribs) |
||
Line 32: | Line 32: | ||
<pre>[root@localhost ~]# dmidecode -q | <pre>[root@localhost ~]# dmidecode -q | ||
</pre> | </pre> | ||
− | '''hdparm -i /dev/hda''': Show harddisk information. | + | '''hdparm -i /dev/hda''': Show harddisk information.<br> |
− | + | '''hdparm -tT /dev/sda''': Do a read test.<br> | |
− | |||
− | '''hdparm -tT /dev/sda''': Do a read test. | ||
− | |||
− | <br> | ||
'''cat /proc/cpuinfo''': Show CPU information. | '''cat /proc/cpuinfo''': Show CPU information. | ||
Line 63: | Line 59: | ||
</pre> | </pre> | ||
− | '''cat /proc/interrupts''': Show | + | '''cat /proc/interrupts''': Show Interrupts information. |
− | |||
− | |||
− | |||
− | |||
− | # | + | '''cat /proc/meminfo''': Show Memory Information. |
+ | <pre> | ||
+ | [root@localhost ~]# cat /proc/meminfo | ||
+ | MemTotal: 1012292 kB | ||
+ | MemFree: 95564 kB | ||
+ | Buffers: 15064 kB | ||
+ | Cached: 279516 kB | ||
+ | SwapCached: 120 kB | ||
+ | Active: 561972 kB | ||
+ | Inactive: 223432 kB | ||
+ | Active(anon): 426008 kB | ||
+ | Inactive(anon): 67376 kB | ||
+ | Active(file): 135964 kB | ||
+ | Inactive(file): 156056 kB | ||
+ | Unevictable: 0 kB | ||
+ | Mlocked: 0 kB | ||
+ | SwapTotal: 2097148 kB | ||
+ | SwapFree: 2097028 kB | ||
+ | Dirty: 0 kB | ||
+ | Writeback: 0 kB | ||
+ | AnonPages: 490736 kB | ||
+ | Mapped: 98116 kB | ||
+ | Shmem: 2560 kB | ||
+ | Slab: 61860 kB | ||
+ | SReclaimable: 27452 kB | ||
+ | SUnreclaim: 34408 kB | ||
+ | KernelStack: 2568 kB | ||
+ | PageTables: 20212 kB | ||
+ | NFS_Unstable: 0 kB | ||
+ | Bounce: 0 kB | ||
+ | WritebackTmp: 0 kB | ||
+ | CommitLimit: 2603292 kB | ||
+ | Committed_AS: 1688032 kB | ||
+ | VmallocTotal: 34359738367 kB | ||
+ | VmallocUsed: 171764 kB | ||
+ | VmallocChunk: 34359537536 kB | ||
+ | HardwareCorrupted: 0 kB | ||
+ | AnonHugePages: 92160 kB | ||
+ | HugePages_Total: 0 | ||
+ | HugePages_Free: 0 | ||
+ | HugePages_Rsvd: 0 | ||
+ | HugePages_Surp: 0 | ||
+ | Hugepagesize: 2048 kB | ||
+ | DirectMap4k: 75648 kB | ||
+ | DirectMap2M: 972800 kB | ||
+ | </pre> | ||
'''cat /proc/swaps''': Show swap files. | '''cat /proc/swaps''': Show swap files. |
Revision as of 11:19, 2 February 2014
Overview
This article describes several linux user space commands that can be useful for doing several tasks
Contents
System Information
arch: Show the machine arch.
uname -m: Show machine arch.
[jdoe@localhost ~]$ arch x86_64 [jdoe@localhost ~]$ uname -m x86_64
uname -r: Show the kernel version.
cat /proc/version: Show kernel version (extra information).
[jdoe@localhost ~]$ uname -r 3.11.10-301.fc20.x86_64 [jdoe@localhost ~]$ cat /proc/version Linux version 3.11.10-301.fc20.x86_64 (mockbuild@bkernel01.phx2.fedoraproject.org) (gcc version 4.8.2 20131017 (Red Hat 4.8.2-1) (GCC) ) #1 SMP Thu Dec 5 14:01:17 UTC 2013
dmidecode -q: Show the system hardware information.
[root@localhost ~]# dmidecode -q
hdparm -i /dev/hda: Show harddisk information.
hdparm -tT /dev/sda: Do a read test.
cat /proc/cpuinfo: Show CPU information.
[root@localhost ~]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 58 model name : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz stepping : 9 microcode : 0x15 cpu MHz : 2891.250 cache size : 4096 KB fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt aes xsave avx f16c rdrand hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm fsgsbase smep bogomips : 5782.50 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:
cat /proc/interrupts: Show Interrupts information.
cat /proc/meminfo: Show Memory Information.
[root@localhost ~]# cat /proc/meminfo MemTotal: 1012292 kB MemFree: 95564 kB Buffers: 15064 kB Cached: 279516 kB SwapCached: 120 kB Active: 561972 kB Inactive: 223432 kB Active(anon): 426008 kB Inactive(anon): 67376 kB Active(file): 135964 kB Inactive(file): 156056 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 2097148 kB SwapFree: 2097028 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 490736 kB Mapped: 98116 kB Shmem: 2560 kB Slab: 61860 kB SReclaimable: 27452 kB SUnreclaim: 34408 kB KernelStack: 2568 kB PageTables: 20212 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 2603292 kB Committed_AS: 1688032 kB VmallocTotal: 34359738367 kB VmallocUsed: 171764 kB VmallocChunk: 34359537536 kB HardwareCorrupted: 0 kB AnonHugePages: 92160 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 75648 kB DirectMap2M: 972800 kB
cat /proc/swaps: Show swap files.
cat /proc/net/dev: Show Network adapters and statistics.
cat /proc/mounts: Show mounted volumes in the system.
lspci -tv: Show PCI devices.
lsusb -tv: Show USB devices.
date: Show the system date.
cal 2014: Show calendar <cal + year>
cal 07 2014: Show month.
date 041217002011.00: set date (set, adjust) date y hour.
clock -w: Save date changes in BIOS.
<tt>[jdoe@localhost ~]$ arch</tt>
<tt>x86_64</tt>
<tt>[jdoe@localhost ~]$ uname -m</tt>
<tt>x86_64 </tt>