
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
A superkaramba theme that parses /proc. Shows an X number of running processes with CPU, Memory usage and program name, sorted by CPU. The default number of processes to show is 5.
Idea based on the gkrelltop a plugin for GKrellM.
pytop.py is the core class file. It can be used within any kind of script.
Keep in mind since it reads /proc directly, this means it's Linux only. As FreeBSD and possibly other *nixes have a completely different /proc layout.
-----------------
The GUI configuration isn't that great. There isn't much error checking. You can always modify the theme configuration files for fine tuning. Any more options and it just becomes too tedious to code. Right click on Karamtop, Configure Theme:
- Choose Theme
- Whether to hide processes with a cpu percent of 0
- Set the alignment for the command (program name) text
- Set the column order of the output
For theme creaters. The theme layout is designed so you can create a directory inside of the theme directory with the name of your theme. Which will contain the configuration file and images. That way you can tar up everything easily. This won't work with the skz format. I suppose maybe I'll make something that will automatically install themes in tar.gz format at some point.
-----------------
Designed to work with my theme, MiniKaramba.
http://www.kde-look.org/content/show.php?content=27802
A karamtop theme with an alternative background: http://www.kde-look.org/content/show.php?content=25626
Work like this is encouraged. Thanks.
15 years ago
0.45
--------------
- Sometimes karamtop/superkaramba would run for weeks without crashing and other times it would crash relatively soon. Now karamtop defaults with threading off, but supports turning it back on through the config.
0.44a
--------------
- Fixed compatibility issues with Python 2.3 (thanks to somebody emailing me and reporting the problem)
0.44
--------------
- Really fixed crashing issues. I simplified the threading engine a lot more.
- Added in support for a better sorting module new in Python 2.4. If you don't have Python 2.4 it should catch this and use the previous method. I do not have any machines with Python 2.3. So, I'm not sure if this works. Please let me know if there are problems.
0.43
--------------
- Fixed a problem where the proc thread would sometimes die if superkaramba locked for a long enough time. Basically it would stop updating. Specifally when liquid weather updates.
0.42
--------------
- Had another bug causing random periodic crashes. Tested it for about 5 days straight on one of my systems.
0.41
--------------
- Improved code for running multiple instances.
- When memory for a process is 0 don't put 'k' after it.
0.40
--------------
- Supports running multiple instances
- Added AeroG theme
0.39
--------------
Sorry for a new version so quick, but I left out a number of things.
- Added GUI option to configure the command (program name) alignment
- Which led to modifying the theme config files. In the future. I will try not to make changes that require modification of the theme config files.
- During testing some changes were made to the look of flatgray. I forgot to change things back for the last release. Mostly minor changes.
0.38
--------------
***Major changes***
Redid the main interface. Now allows for themes. See inside the themes directory
Provides GUI options to configure:
- The theme (currently flatgray and TDE)
- Whether to hide processes with a cpu percent of 0 (overrides theme settings)
- The order of the output (overrides theme settings)
0.37
--------------
(internal release)
Complete redesign of the engine. Simpler and more efficient
15 years ago
0.45
--------------
- Sometimes karamtop/superkaramba would run for weeks without crashing and other times it would crash relatively soon. Now karamtop defaults with threading off, but supports turning it back on through the config.
0.44a
--------------
- Fixed compatibility issues with Python 2.3 (thanks to somebody emailing me and reporting the problem)
0.44
--------------
- Really fixed crashing issues. I simplified the threading engine a lot more.
- Added in support for a better sorting module new in Python 2.4. If you don't have Python 2.4 it should catch this and use the previous method. I do not have any machines with Python 2.3. So, I'm not sure if this works. Please let me know if there are problems.
0.43
--------------
- Fixed a problem where the proc thread would sometimes die if superkaramba locked for a long enough time. Basically it would stop updating. Specifally when liquid weather updates.
0.42
--------------
- Had another bug causing random periodic crashes. Tested it for about 5 days straight on one of my systems.
0.41
--------------
- Improved code for running multiple instances.
- When memory for a process is 0 don't put 'k' after it.
0.40
--------------
- Supports running multiple instances
- Added AeroG theme
0.39
--------------
Sorry for a new version so quick, but I left out a number of things.
- Added GUI option to configure the command (program name) alignment
- Which led to modifying the theme config files. In the future. I will try not to make changes that require modification of the theme config files.
- During testing some changes were made to the look of flatgray. I forgot to change things back for the last release. Mostly minor changes.
0.38
--------------
***Major changes***
Redid the main interface. Now allows for themes. See inside the themes directory
Provides GUI options to configure:
- The theme (currently flatgray and TDE)
- Whether to hide processes with a cpu percent of 0 (overrides theme settings)
- The order of the output (overrides theme settings)
0.37
--------------
(internal release)
Complete redesign of the engine. Simpler and more efficient
VgnFrnd
12 years ago
I wonder why more designers of "slim" system monitors aren't incorporating your code into their monitors? Alternatively, I wonder if you might modify some of the other system monitors to include your code, effectively "karamtopping" them?
Regardless of what happens next, thank you for a writing such a nifty piece of code.
Report
HavinItAgain
13 years ago
I have a small question. I want to re-position the theme to the bottom-right corner of my desktop, but whenever I reload it (or restart my desktop session) it jumps about 200px up/left. Is there a way I can make it stay put?
Report
rdoggsv
15 years ago
Report
sango
15 years ago
Now i found the attribute self.pcpu which is set in __init__ and in self.totalCPU(), but is'nt use a any place. So, what do self.pcpu? And where is it used?
Report
moloch
15 years ago
Report
sango
15 years ago
Report
moloch
15 years ago
BTW, if you make any improvements, I'd be interested in seeing them.
Report
kovidgoyal
15 years ago
ps -eo comm,pcpu,pmem --sort -pcpu | head -n7
Report
moloch
15 years ago
Thanks for the comment though.
Report
kovidgoyal
15 years ago
Report
moloch
15 years ago
Thanks for the command, I may try playing around with using it.
Report
moloch
15 years ago
Basically to see this. Take some application and generate a bunch of CPU usage with it. Leave it idle and compare the output of ps with the output of top. They differ by a lot, atleast with me. You also notice the opposite. Make the application generate a bunch of CPU usage, while doing so. Look at top. It should spike to 99%. Since ps is taking the average. CPU usage will rise gradually while the applicaton sustains high CPU usage.
Report
sango
15 years ago
Report
moloch
15 years ago
That was only a cover for my real motivation. Which was that I really love Python and wanted to do something that would get me familiar with creating classes. As an old Perl programmer my OO concepts weren't that great. When I had slight pauses in superkaramba during updates. I figured why not complicate things more and learn threading. The reality is parsing /proc managed to save about 1% cpu usage on my slowest machines and negligible on my fastest machine.
That's all karamTop is to me. A big learning project. I put it here so others can benefit from it.
Report
soxofaan
15 years ago
http://www.kde-look.org/content/show.php?content=21482
My approach seems to have some problems with shared memory and percentages not adding up to 100%.
I think karamTop can inherently do a better job.
Report
elessar
15 years ago
Anybody knows why I can't execute this theme together with ZyzSysmon or karamtop? after working 5 min, a new instance of superkaramba starts and my themes become frozen. Is there any incompatibility with both themes?
Thank you very much
Report
moloch
15 years ago
It appears he is using my theme. There is an issue with running more than one instance of karamtop at the same time. If you are using his theme, then there is no need to use mine at the same time.
I'll look into allowing more than one instance, in the meantime I will release something that at least gives an error message rather than causing superkaramba to completely freeze.
Report
amdecko
15 years ago
Report
sango
15 years ago
Report
moloch
15 years ago
Report
sango
15 years ago
Report
moloch
15 years ago
However I can't at all figure out why you would be having issues. Maybe it's a problem with kde-look. Here are direct links to both the files on my server.
http://jeffg.dnsalias.com:81/software/karamtop-0.38.tar.gz
http://jeffg.dnsalias.com:81/software/karamtop-0.38.skz
Report
sango
15 years ago
After all, the KDE-Look-Link don't work, but i found out that i should be a problem of my browser. I use Opera, which have the problem. But with Konqueror, it load without problems :-?
Report
solanum
15 years ago
Report
moloch
15 years ago
Report