how can i know how many system calls where from linux has been boots

Submitted by linlin10
on October 1, 2004 - 12:16pm

how can i know how many many system calls where from linux has been boots
(in c)

Two suggestions:

Anonymous
on
October 1, 2004 - 9:14pm

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

Anonymous
on
October 2, 2004 - 5:04am

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

Anonymous
on
October 2, 2004 - 10:25am

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

Anonymous
on
October 2, 2004 - 11:55am

Ask the following little words google:
"Linux Device Driver"

it's the first entry...

you are doomed

on
October 2, 2004 - 12:49pm

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

on
October 5, 2004 - 6:00am

i am looking fron in the internet for 6 days and didnt found yet

give a look at strace utility

Anonymous
on
October 5, 2004 - 7:11am

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

Anonymous
on
October 7, 2004 - 2:57pm

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.