Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

system calls vs /proc, do they provide same information?

51 views
Skip to first unread message

Faisal

unread,
Oct 17, 2003, 1:28:25 PM10/17/03
to
Hi,
I am writing some utilities in perl to get most of the system
information (e.g hardware/memory/diskusage etc. ) from /proc.
I can get many kind of information from /proc But it seems that /proc
dont provide whole information.

for example.
1. 'uname' command gives the machine_type and hardware_platform
information e.g i386,i686. but this information is nowhere mentioned
in /proc/*.
The "uname" command use the system call 'sysinfo' to get this
information.

2. The disk usage informaiton is nowhere available in /proc/*
The 'df' commnad use /proc to get the partition names and then uses
system call 'fstat('/dev/hdx') to get this information.

So my question is that should i use the system calls to get this
information about system ?
OR
Can i get all this informaiton from the /proc (My actual task)? and
from where?

Thanks for your help plese . I am really stuck.

Faisal

emilio lazardo

unread,
Nov 5, 2003, 8:11:13 PM11/5/03
to
In 2.4.x kernels:

/proc/sys/kernel/hostname
/proc/sys/kernel/domainname

/proc/mounts
/proc/partitions

rgds,
tim.

0 new messages