You are not logged in.

#1 2005-05-09 17:08:55

Meshuggin
Member
From: /home/meshuggin
Registered: 2005-03-23
Posts: 137

Kinda "top" in torsmo

Hi, I've been testing tosmo and it's great ... I was just wondering ... is there some way to include something like gkrelltop (gkrellm plugin)?, It's very useful (at least for me) and because that detail, I still use gkrellm and not torsmo.

The thing is to get the top 3 services using more CPU ... maybe some script?, any idea?

Thanxs


Arch GNU/Linux 0.7.1 (Noodle)
Linux 2.6.14-archck1

Offline

#2 2005-05-10 04:31:22

tbroderick
Member
Registered: 2005-05-06
Posts: 45

Re: Kinda "top" in torsmo

Try adding this:
${execi 5 ps gaxo %cpu,%mem,comm,user | sort +0nr | head -n 10 }

Offline

#3 2005-05-10 05:18:48

Meshuggin
Member
From: /home/meshuggin
Registered: 2005-03-23
Posts: 137

Re: Kinda "top" in torsmo

tbroderick wrote:

Try adding this:
${execi 5 ps gaxo %cpu,%mem,comm,user | sort +0nr | head -n 10 }

it works great!, thanxs a lot! ... two more things:

- Can you explain me what it does: "gaxo", "sort + 0nr" (kinda sorting i know ...but more specific) ? I like to know how things work, not just copy-paste
- Can i add the date in torsmo?, I tried : $date, $(date), ${date} and no results, what's missing?


Arch GNU/Linux 0.7.1 (Noodle)
Linux 2.6.14-archck1

Offline

#4 2005-05-10 10:28:43

trapdoor
Member
Registered: 2005-03-27
Posts: 82
Website

Offline

#5 2005-05-10 20:36:05

tbroderick
Member
Registered: 2005-05-06
Posts: 45

Re: Kinda "top" in torsmo

I got the script from the gentoo fourms. Gaxo, i think, are options for the 'ps' command. You can try 'man ps' to read about it.

The 'sort + 0nr', just sorts the %cpu in numerical reverse order while leaving off everything that use 0 cpu. There are alot of programs that run in the background which use 0 cpu but some mem. You can change to how you like. Put %mem,%cpu,comm,user and it will sort it by mem. Read 'man sort' for more info.

Like trapdoor said. To get the date it's ${time} not ${date}Read 'man strftime' to get all the options. Mine is ${time %I:%M  %A %m-%d-%y}.

I'd also recoomed you check out http://forums.gentoo.org/viewtopic-t-29 … 4ed7cd4c4a

Offline

#6 2005-05-10 23:45:40

Meshuggin
Member
From: /home/meshuggin
Registered: 2005-03-23
Posts: 137

Re: Kinda "top" in torsmo

Thanxs tbroderick for all the tips wink


Arch GNU/Linux 0.7.1 (Noodle)
Linux 2.6.14-archck1

Offline

Board footer

Powered by FluxBB