That's a little cold. Give the guy a bit of a hint, as in
run "truss" on a command that reports one or more of what you
want. (You'll have to be root if the command is setuid; if you don't
have root, you don't have any business trying to write stuff to do
these things anyway.) Swap is easy, see swapctl(2). File system
type and size can be obtained with statvfs(2) (which df(1) uses),
but statvfs does _not_ provide utilization or performance info
(hint: truss iostat;man kstat). Hardware type name is really easy,
so I won't quite tell you the system call (hint: truss uname).
If it's literally homework, I left the slacker a tiny bit yet to do,
esp. on the filesystem utilization info. :-) If it's not, and this
is just a case of clueless trying to get a clue, well that _is_ one
of the reasons people come here...
> Do your own school work and you might learn something!
>> hi all:
>> Anyone do me a favor?
>> Is there any system call to read the following system information:
>> 1) swap size
>> 2) file system type/file system size/file system use rate
>> 3) device name such as "Ultra 5"
>> I want to use system call,not command line utility.
>> Thanks a lot!
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
--
ftp> get |fortune
377 I/O error: smart remark generator failed
Bogonics: the primary language inside the Beltway