Linux programming


 
Thread Tools Search this Thread
Operating Systems Linux Linux programming
# 1  
Old 09-11-2009
Java Linux programming

Hi friends!

I am new be in Linux system programing. Can you help me to get running processes statistics (pid, uid, %cpu, %mem, pri, ni) without using any commands like TOP, PS.

Can you tell me any system call available to get %cpu only or %mem only?
Even i include the vmstat.c file to achieve memory statistics by calling those function within vmstat.c file.When i compile my application program it shows an error that No such file or Directory

My requirement is that i want to achieve running processes statistics from my application program. When i compile my application program, the program must give the result like TOP command.

Smilie
# 2  
Old 09-11-2009
Start by learning about the /proc filesystem. It has process information.
proc(5): process info pseudo-filesystem - Linux man page See /proc/[number]/stat particularly

This sounds like homework. The forums do not allow homework
# 3  
Old 09-14-2009
Hi jim mcnamara!

The above link you had given to me, Its very nice link to start my system programming. Thank you very much.

Thanks & Regards
Venkat Gopu
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Linux programming

Develop a program to display file given on the command line to STDOUT, please give sample program (2 Replies)
Discussion started by: ainstin
2 Replies

2. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies

3. Shell Programming and Scripting

Shell programming in Linux

Hi, I have been working on Sun Solaris since a long time. Recently I got to work on RH Linux. My Linux version details are: Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux I have a simple command in my shell script: export BKPTAG=`date... (3 Replies)
Discussion started by: sagarparadkar
3 Replies

4. Linux

C programming in linux

Hi friends In my linux application, i want to update output in same place i.e.. I want to display my output in specific location in screen(console output) ITERATION 1: (e.g. start diplay from 5th ROW 5th COLOUMN) if my message is "hi" then first time 'h' should print in 5th ROW... (2 Replies)
Discussion started by: venkatgopu
2 Replies

5. Programming

c programming in linux

can you guys please let me know what are some of the c programming environment program? you know the ones with checking syntax and auto indentation and such.. dont want to just use vi (although someone did mention to me that in vim, there are capabilities.. but not sure how) thanks in advance. (6 Replies)
Discussion started by: convenientstore
6 Replies

6. UNIX for Dummies Questions & Answers

Linux Programming in JAvA

is it advisible to do Linux Programming in JAVA.. If so, whats the advantage over C++ or C.. Cud anyone also help me out by providing some links in this regard.. Would be highly appreciated.. (1 Reply)
Discussion started by: srikumar_cs
1 Replies

7. Linux

Need Help Of Linux Programming

hi frnds i need help on linux programming as well as how to configure linux. if u feel free than plz forward me the mail so that i can go through. email removed thanx regards :) vishwa pratap singh (1 Reply)
Discussion started by: luckyvishwa
1 Replies

8. New to Unix. Which books should I read?

Any Usefull Ebooks on Linux Programming?

Hi Forum! Is there anybody who can tell me where I can find some cool books on linux ( RH exclusively! if possible ) programming? :p (2 Replies)
Discussion started by: confusedoflife
2 Replies

9. Programming

Programming C in Linux

Hello, I am a basic programer from back in the 80's/90's. I moved on to visual basic and now I want to learn C. I want to eventually program in Linux. Now, before I get on this band wagon I want to ask a few questions to make sure I am getting started out right. 1. Is C a good language to... (2 Replies)
Discussion started by: wizkid
2 Replies
Login or Register to Ask a Question