LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [Help]How To display or list my systemcall in fedora 5? (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bhelp%5Dhow-to-display-or-list-my-systemcall-in-fedora-5-a-517094/)

iCc 01-07-2007 06:06 AM

[Help]How To display or list my systemcall in fedora 5?
 
Hi guys...
I'm new to this forum and to linux also...
i need some help here... i've been trying to make a new system call from my fedora 5, i want to try to list or display the system call which takes the name of a program as a parameter and reports the following statistics for the given program assigned by the user. In other words, a tool reporting the statistics of any running program specified by users can be implemented through your new system call.
But i still can't make it... well i'm really newbie to this linux...
can somebody help me with a tutorial?
thanks in advance...

Regards,
iCc

FnordPerfect 01-07-2007 08:21 AM

Geez, what's going on here!? :-D
Is this what you consider a typical "Linux newbie" question?? It is concerning Linux *programming* isn't it?? Why not post it into the *Programming* forum...?
I would have expected something more like "Hi i m new to Linux Where must I click my mouse to start into the intarwebs??"

I read your post several times, and I honestly don't even get what you are talking about.
However, there are a lot of good Linux programming resources here:
http://stommel.tamu.edu/~baum/programming.html

iCc 01-07-2007 09:54 AM

Hi there FnordPerfect...
well i think this topic is kind of a newbie topic too lol...
well maybe i'm not quite good in explaining my purpose, my purpose of this project is to modify the Linux kernel to record and report some statistics of programs after their execution. The kernel will provide a system call, which takes the name of a program as a parameter and reports the following statistics for the given program assigned by the user. In other words, a tool reporting the statistics of any running program specified by users can be implemented through your new system call.

1. the program name
2. the CPU time consumed during the execution
3. the number of files, if any, and their total size opened to read during the execution
4. the number of child processes, if any, created for the program during the execution.
5. the number of context switch performed for the program during the execution

ps: i already see the website you gave me and i still can't find what i need... thanks anyway.

FnordPerfect 01-07-2007 10:10 AM

but there are quite a lot of statistics already available four your viewing pleasure in the virtual /proc filesystem. have a look there and you'll find that every process PID running has its own virtual directory there.
In there you'll find
* the program name
* the total number of files (open file descriptors) in ./fd
* countless other stuff I have not a clue about.
Check Documentation/filesystems/proc.txt in the kernel source directory.

But anyway, I'm outa here, I'm not a programmer at all!

good luck

PS: I still think this should go into Programming forum


All times are GMT -5. The time now is 06:51 PM.