Community discussions

MikroTik App
 
zelan
just joined
Topic Author
Posts: 11
Joined: Sun May 03, 2009 1:10 am

Display cpu_mem_disk on Dude icon

Fri Oct 02, 2009 4:04 am

How do I get cpu_mem_disk function to display on dude like in the image below
You do not have the required permissions to view the files attached to this post.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Display cpu_mem_disk on Dude icon

Mon Oct 05, 2009 5:28 pm

Right click device, select appearance, click the down arrow next to label.

You should leave [Device.Name] and [Device.ServicesDown] on the label.
Add the following to the device label.

[device_performance()]

or something like this

Load on [array_size(oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad"))] CPU('s): [oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad")]


The first one will add "cpu X mem X virt X disk X.

The second one will add "Load on X CPU('s) x,x,x,x" to the label.

I have them both on the label for my dude server...

More generically you can add any oid to a label by reading the oid you are interested in directly and placing it in the .
label : [oid("x.x.x.x.x.x.x.x")]

You can get creative and do much more complex things like find out how many copies of svchost.exe are running.
[array_element(oid_column("1.3.6.1.2.1.25.4.2.1.2"), array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"svchost.exe"))]
[array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"svchost.exe")]

HTH,
SD
 
Sharade
just joined
Posts: 9
Joined: Thu Apr 19, 2012 12:16 pm

Re: Display cpu_mem_disk on Dude icon

Fri Apr 20, 2012 3:04 pm

I know this thread is kinda old, but if i put "[device_performance()]" in the appearance its just written in the picture.
Look @ pic.
You do not have the required permissions to view the files attached to this post.
 
migoz
just joined
Posts: 4
Joined: Tue Jan 10, 2012 9:05 am

Re: Display cpu_mem_disk on Dude icon

Mon Apr 23, 2012 10:02 am

You can get creative and do much more complex things like find out how many copies of svchost.exe are running.
[array_element(oid_column("1.3.6.1.2.1.25.4.2.1.2"), array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"svchost.exe"))]
[array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"svchost.exe")]
this is not "how many copies of svchost.exe are running"
this is index of first svchost.exe in process list
 
migoz
just joined
Posts: 4
Joined: Tue Jan 10, 2012 9:05 am

Re: Display cpu_mem_disk on Dude icon

Mon Apr 23, 2012 10:09 am

Sharade, how did you created values for every hard disk? is it possible to make a function that retrieves number of hard disks of device and shows free space of each of them or of only one which you selected?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Display cpu_mem_disk on Dude icon

Thu Apr 26, 2012 1:16 am

[device_performance()] still works as it should for me, I am stumped for your trouble... Make certain you didn't somehow grab some special characters with the [device_performance()] copy by pasting it into notepad before pasting it on a device label???
 
Sharade
just joined
Posts: 9
Joined: Thu Apr 19, 2012 12:16 pm

Re: Display cpu_mem_disk on Dude icon

Thu Apr 26, 2012 11:55 am

The Problem is, i don't even have the function [device_performance()] in the list.
So i was asking for the insert... the code of [device_performance()]... understandable?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Display cpu_mem_disk on Dude icon

Mon Apr 30, 2012 8:20 pm

Something is wrong with the installation? If you are running on RB than it doesn't get installed on RB?(just a guess) I am on 4.0b3 w2k3...