Operating System - HP-UX
1834689 Members
2309 Online
110069 Solutions
New Discussion

Understanding HP-UX System Calls

 
SM_3
Super Advisor

Understanding HP-UX System Calls

Understanding HP-UX System Calls.

I once read a thread stating that ideally a system admin should understand system calls (it could have been A.Clay who said this, can't remember correctly).

Well the time has come for me to understand these system calls because I really don't know much about them!

1) What is meant by understanding these system calls?

2) Why should we try to understand these system calls and how will it help?

3) The system call man pages are not the greatest tutorials on this subject, where can I find some decent tutorials?

4) Those who know much about the subject than me, is there anything additional that I should have asked about?

Thanks.
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: Understanding HP-UX System Calls

1) What is meant -- Well, if someone writes a C program and does a malloc, then it means knowing what a malloc does.

2) Why -- If you know what a malloc does, then that will help you in troubleshooting any problems you may have down the line.

3) True - The book "HP-UX 11i Internals" might help -- http://www.amazon.com/exec/obidos/tg/detail/-/0130328618/qid=1086703703/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/002-7776193-9332069?v=glance&s=books&n=507846

4) It would also probably help you in this case if you understand C programming.
Bharat Katkar
Honored Contributor

Re: Understanding HP-UX System Calls

Hi there,
Well i also start learning more about system call with you ( right from this thread ).

See what i found about those System Calls:

http://www.informatik.uni-frankfurt.de/doc/man/hpux.section_2.html

Thought it could help you.
Regards,
You need to know a lot to actually know how little you know
Mark Grant
Honored Contributor

Re: Understanding HP-UX System Calls

For me, I think knowing system calls for a system administrator is a bit like knowing about gardening for a chef.

It certainly isn't a requirement but if you know how the best herb is grown, it might help you understand why your Duck a l'orange tastes like a badger.

For a more relevant example, if you know how application actually remove a file ( the unlink() system call) and the OS's involvment in this little job it can sometimes help you guess solutions to a problem such as the classic "I deleted a 3GB file by the filesystem space hasn't gone down".

It's a question of knowing the real detail I suppose. You won't need to make system calls yourself, unless you want to but you'll know what all those applications on your system are really doing.

Personally, I think the man pages are perfect for learning these things. man pages are extremely well written (with the exception of the "sed" page) and extremely detailed. I'll admit they are a bit dry though.

My advice if you really want to know, get the hard copy unix man pages, particularly section 2, start learning C and read through those man pages. To start you'll understand nothing but as you progress you'll remember all the funky features that you read and be able to use them yourself.
Never preceed any demonstration with anything more predictive than "watch this"
Nicolas Dumeige
Esteemed Contributor

Re: Understanding HP-UX System Calls

Hello,

I really enjoyed reading Andrew Tanenbaum book, not specific to HP-UX but very didactic.
http://www.cs.vu.nl/~ast/books/mos2/

This kind of knowledge is usefull when you :
- monitor the system : the %Sys consumption, this is your sys call.
- trace an application : you see the application code using OS API and therefore you can see what is time consuming.
- develop in C or just use a compiler.

Anyway, I don't think you need to read all books on the subject. Read what fits your need as the problem arise.

Take pleasure exploring the internal of your fevorite OS.

Cheers

Nicolas

All different, all Unix
Jeff Schussele
Honored Contributor

Re: Understanding HP-UX System Calls

OK - now I've read it all on the forum.
Duck *and* badger in the same post with a culinary twist.....hmmmm......naaahhh not gonna go there - too easy.

But I do have a bit to toss in....Knowing system calls & what commands issue what calls can be quite useful in decoding auditing logs.

My tip,
Jeff (Pun definitely intended)
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Nicolas Dumeige
Esteemed Contributor

Re: Understanding HP-UX System Calls

Just another word, first thing first, you need to know what purpose serve sys call.

Sys calls can be think of as services, the OS is an abstraction layer, and there are operations that need to be done with the maximum privilege and/or with exclusive access to a resource. For instance, deal with hardware is typically a system privilege, therefore, if you want to have an action on this, you'll have to use a sys call.

All different, all Unix
Manish Srivastava
Trusted Contributor

Re: Understanding HP-UX System Calls

Hi,

1) What is meant: You have an understanding what is a system call, why this scehme is provided to the users and to understand what can be done in user space and for what kind of services we require kernel support.

2) why understand: If you know how a system call works on a broader scale and how the kernel manages the resources this makes things quiet easy to debug.

3) tutorials...: I agree with you, the manpages assumes basic knowledge and just lists the usage and perhaps very little concept. Just do a google search for system call and you will find quiet a few publications.


my 2p's

manish