Wednesday, January 30, 2013

HowTo: Check RAM Size & Cpu hardware from the command line

HowTo: Check RAM Size


 
grep MemTotal /proc/meminfo
 
Sample outputs:
MemTotal:        8189496 kB
The above output indicates that I've total 8GiB ram.

HowTo: Check cpu hardware


$ cat /proc/cpuinfo

Sample outputs:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model  : 15
model name : Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
stepping : 11
cpu MHz  : 1596.000
cache size : 4096 KB
physical id : 0
siblings : 4
core id  : 0
cpu cores : 4
apicid  : 0
initial apicid : 0
fpu  : yes
fpu_exception : yes
cpuid level : 10
wp  : yes
flags  : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow vnmi flexpriority
bogomips : 4800.18
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
....
..
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model  : 15
model name : Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
stepping : 11
cpu MHz  : 1596.000
cache size : 4096 KB
physical id : 0
siblings : 4
core id  : 3
cpu cores : 4
apicid  : 3
initial apicid : 3
fpu  : yes
fpu_exception : yes
cpuid level : 10
wp  : yes
flags  : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow vnmi flexpriority
bogomips : 4800.30
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
To count processor (including cores), enter:
grep -c processor /proc/cpuinfohttp://www.cyberciti.biz/faq/ubuntu-cpu-information/

Wednesday, January 2, 2013

Hard disk usage from command line on Linux


$ df -h -T

The df utility displays the disk space usage on all mounted filesystems.
The -T option prints the filesystem type as well.
By default, df measures the size in 1K blocks, which could be a little difficult for a desktop user to decipher.
Use the -h option to get more understandable output.

--------------------------------------
If you want the size of an particular directory, specify it with du directoryname. For instance,
$ du -h /home/

$ du -ah | sort -n
Here we’ll check the disk usage of the current directory, and display all file names with their disk usage, and then sort them numerically using the sort utility.

--------------------------------------

http://www.geekyboy.com/archives/133