1) I wouldn't be surprised if there was a framework for gathering this sort of data already. You might want to Google around for profiling / tracing frameworks you can use.
2) You could instrument the system call path in the kernel sources to add a counter and then read this count out somehow.
Try looking at the Linux Device Drivers book, that tells you how to create /proc files for Linux 2.4. The book is published by O'Reilly but licensed under the GFDL and available online.
Why not start off by just making a proc file. You can figure out how to count system calls later on.
1)I"m ashame being in the same University as linlin10
2) Our lecture will brake the assignment and I"ve already finished it. I have no time to do it from the beginning
Two suggestions:
1) I wouldn't be surprised if there was a framework for gathering this sort of data already. You might want to Google around for profiling / tracing frameworks you can use.
2) You could instrument the system call path in the kernel sources to add a counter and then read this count out somehow.
doesent help
i need to make a /proc file that tell how many
system calls where from the boot
i m not allowed to make a counter
(its a project from my university)
LDD Book
Try looking at the Linux Device Drivers book, that tells you how to create /proc files for Linux 2.4. The book is published by O'Reilly but licensed under the GFDL and available online.
Why not start off by just making a proc file. You can figure out how to count system calls later on.
LDD-Book
Ask the following little words google:
"Linux Device Driver"
it's the first entry...
you are doomed
Your are supposed to count the system calls, but must not do this with a counter of any kind? You are completely doomed, this is contradictory.
Being a /proc-file or not and being a counter or not are completely orthogonal things, by the way.
Have you found and evaluated some of the different debuggers/tracing toolkits by now, some of them part of the kernel, some outside?
By the way, is your assignment 'count the system calls' or 'ask on a kernel forum how to count system calls and let others do it for you'?
i am looking fron in the internet for 6 days and didnt found yet
i am looking fron in the internet for 6 days and didnt found yet
give a look at strace utility
will certainly find how to instrument a process
or :
look at LSM if they can give you an entry point to count syscalls
CC
Please, remove thease mmmmmessages
1)I"m ashame being in the same University as linlin10
2) Our lecture will brake the assignment and I"ve already finished it. I have no time to do it from the beginning
Thanks