- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I wondered if anybody could help me with this: I want to monitor all the processes that are loaded in µClinux (CPU usage, memory usage,...). Warm RegardsLink Copied
13 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look in the /proc file system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by hippo@Mar 22 2006, 03:30 AM look in the /proc file system.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13657)
--- quote end ---
--- Quote End --- Ok hippo, thanks Warm Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- I want to monitor all the processes that are loaded in µClinux (CPU usage, memory usage,...). <div align='right'><{post_snapback}> (index.php?act=findpost&pid=13655) --- Quote End --- [/b] --- Quote End --- Hi, To do so I executed the ps command, it gives all the stuff I need, unfortunately there is no top command so I got to write a script to execute the ps command every 3s and write results to a file. If anybody could help in that, that's gonna be cool. Warm Regards.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by mfm@Mar 24 2006, 02:42 AM ...unfortunately there is no top command so i got to write a script to execute the ps command every 3s and write results to a file.
if anybody could help in that, that's gonna be cool. --- Quote End --- Hi MFM, I haven't tried it yet, but it looks like top command may already have been been ported http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif * Follow step 13 here... http://forum.niosforum.com/forum/index.php?showtopic=3174# (http://forum.niosforum.com/forum/index.php?showtopic=3174#) * Select Miscellaneous Applications --> Propcs tools --> top
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oops. I tried building the top and setserial apps from dist-test, however no binaries were generated.
Any ideas?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- unfortunately there is no top command so I got to write a script to execute the ps command every 3s and write results to a file.[/b] --- Quote End --- Hi, well, I wrote that script and it works fine with one exception: I want to launch the ps command every 3s and save results in mfm.txt till the q key is pressed. I'm still testing it in Redhat before implementing it in µClinux. The only problem is how to get the q key stopping the execution of the script # ################################## # !/bin/sh touch mfm.txt until [ "$*" = "q" ]; do sleep 3 date >> mfm.txt ps >> mfm.txt echo " " >> mfm.txt; done # ################################## Can anybody help me with that ? Warm Regards- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why are you doing this when you can just get 'top' from busybox? Moreso, doesn't the processor need some sort of time reference to actual calculate loading on the CPU? IE: a RTC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- ################################### # !/bin/sh touch mfm.txt until [ "$*" = "q" ]; do sleep 3 date >> mfm.txt ps >> mfm.txt echo " " >> mfm.txt; done # ##################################/b --- Quote End --- Hi, I've tried to execute that script under µClinux after changing the sleep 3 command, which isn't implemented in µClinux, by the following:# ############### for ((a=1;a<300;a++)) do echo done# ############### But unfortunately it won't work http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif I'm getting some "syntax error". Can anybody help me with that. Warm Regards- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by jdhar@Mar 24 2006, 06:02 PM why are you doing this when you can just get 'top' from busybox? --- Quote End --- Hi, that's cause I spent a lot of time trying to compile it but all I got is a lot of errors maybe you can help. This is the console output (I'm under Windows) <div class='quotetop'>QUOTE </div> --- Quote Start --- make -k all no emulation specific options. nios2-elf-gcc -nostdinc -D__linux__ -O2 -I"c:/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.uClibc_1.4.0"/include -I/cygdrive/c/altera/kits/nios2/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1//include -fno-optimize-sibling-calls -mhw-mul -mhw-mulx -Wall -c -o top.o top.c In file included from top.c:37: page.h:27:20: config.h: No such file or directory In file included from busybox.h:27, from top.c:38: config.h:4:28: linux/autoconf.h: No such file or directory In file included from busybox.h:54, from top.c:38: libbb.h:49:18: pwd_.h: No such file or directory libbb.h:50:18: grp_.h: No such file or directory In file included from busybox.h:54, from top.c:38: libbb.h:426: warning: "struct passwd" declared inside parameter list libbb.h:426: warning: its scope is only this definition or declaration, which is probably not what you want libbb.h:427: warning: "struct passwd" declared inside parameter list libbb.h:435: warning: "struct passwd" declared inside parameter list libbb.h:436: warning: "struct passwd" declared inside parameter list libbb.h:438: warning: "struct passwd" declared inside parameter list libbb.h:439: warning: "struct passwd" declared inside parameter list top.c:57: warning: 'pid_sort' defined but not used make: *** [top.o] Error 1 make: Target `all' not remade because of errors.[/b] --- Quote End ---
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by jdhar@Mar 24 2006, 06:02 PM why are you doing this when you can just get 'top' from busybox? --- Quote End --- I succeded in building that one but when I launch it, µClinux reboot. I tested it again and again and it's always the same!!!!!!! Any idea? Warm Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you are looking for something GUI based like Windows task manager, Then have a look at LTaMe (Linux Task Manager) in source forge. This was made by me and 3 of my friends. Works but got some small bugs. It is made of QT. If u want to monitor tasks running on target you will have to write some socket programs and run LTaMe on ur linux box. It currentlygives details about the linux box on which u run LTaMe. Have a look. <div class='quotetop'>QUOTE </div> --- Quote Start --- Is any one interested in doing that??????????????????[/b] --- Quote End ---- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by mfm+mar 25 2006, 01:31 am--><div class='quotetop'>quote (mfm @ mar 25 2006, 01:31 am)</div>
--- quote start ---
<!--quotebegin-jdhar@Mar 24 2006, 06:02 PM why are you doing this when you can just get 'top' from busybox? --- Quote End --- I succeded in building that one but when I launch it, µClinux reboot. I tested it again and again and it's always the same!!!!!!! Any idea? Warm Regards <div align='right'><{post_snapback}> (index.php?act=findpost&pid=13771)</div> [/b] --- Quote End --- I checked the 'top' of busybox with buildroot tools. It runs without problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TO_BE_DONE

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page