get system info? (linux/unix)


M

Mr. S

Hi!

How can I retrive system infos under linux/unix? I want to know CPU
frequency, CPU usage, RAM, RAM usage.

THX
Mr. S
 
Ad

Advertisements

J

James Aguilar

Mr. S said:
Hi!

How can I retrive system infos under linux/unix? I want to know CPU
frequency, CPU usage, RAM, RAM usage.

Probably ask in a linux programming newsgroup.

- JFA1
 
M

marbac

Mr. S said:
Hi!

How can I retrive system infos under linux/unix? I want to know CPU
frequency, CPU usage, RAM, RAM usage.

THX
Mr. S

Open the files in /proc and parse for the info.
e.g. cpuinfo: /proc/cpuinfo
 
E

E. Robert Tisdale

Mr. S said:
How can I retrive system infos under linux/unix?
I want to know CPU frequency, CPU usage, RAM, RAM usage.
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 9
cpu MHz : 2994.945
cache size : 512 KB
physical id : 0
siblings : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
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
bogomips : 5976.88
cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 3169955840 2455195648 714760192 0 77500416
2259369984
Swap: 6440329216 8298496 6432030720
MemTotal: 3095660 kB
MemFree: 698008 kB
MemShared: 0 kB
Buffers: 75684 kB
Cached: 2204828 kB
SwapCached: 1588 kB
Active: 1527844 kB
ActiveAnon: 6020 kB
ActiveCache: 1521824 kB
Inact_dirty: 200812 kB
Inact_laundry: 232080 kB
Inact_clean: 324152 kB
Inact_target: 456976 kB
HighTotal: 2228160 kB
HighFree: 683172 kB
LowTotal: 867500 kB
LowFree: 14836 kB
SwapTotal: 6289384 kB
SwapFree: 6281280 kB
 
?

=?iso-8859-1?q?Beno=EEt_Dejean?=

Le Mon, 28 Mar 2005 15:18:27 -0800, Mr. S a écrit :
Hi!

How can I retrive system infos under linux/unix? I want to know CPU
frequency, CPU usage, RAM, RAM usage.

you can use a library such as libgtop.
 
Ad

Advertisements

M

Mr. S

E. Robert Tisdale said:
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 9
cpu MHz : 2994.945
cache size : 512 KB
physical id : 0
siblings : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
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
bogomips : 5976.88

total: used: free: shared: buffers: cached:
Mem: 3169955840 2455195648 714760192 0 77500416
2259369984
Swap: 6440329216 8298496 6432030720
MemTotal: 3095660 kB
MemFree: 698008 kB
MemShared: 0 kB
Buffers: 75684 kB
Cached: 2204828 kB
SwapCached: 1588 kB
Active: 1527844 kB
ActiveAnon: 6020 kB
ActiveCache: 1521824 kB
Inact_dirty: 200812 kB
Inact_laundry: 232080 kB
Inact_clean: 324152 kB
Inact_target: 456976 kB
HighTotal: 2228160 kB
HighFree: 683172 kB
LowTotal: 867500 kB
LowFree: 14836 kB
SwapTotal: 6289384 kB
SwapFree: 6281280 kB

Thanks a lot Mr. Tisdale! That's the right information!

THX
Mr. S
 
Ad

Advertisements


Top