Community discussions

MikroTik App
 
DyadyaGenya
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Mon May 08, 2023 10:34 pm

CPU usage script in terminal

Tue May 09, 2023 10:30 pm

Hello. I'm quite new to writing scripts for Mikrotik. But I needed a script that would display used of the Mikrotik processor in the terminal. Is it possible?
 
mdadigital
newbie
Posts: 34
Joined: Tue Feb 21, 2023 7:48 pm

Re: CPU usage script in terminal

Fri May 12, 2023 10:16 am

Hello. I'm quite new to writing scripts for Mikrotik. But I needed a script that would display used of the Mikrotik processor in the terminal. Is it possible?
:local cpuLoad [/system resource get cpu-load] 
:put $cpuLoad 
 
DyadyaGenya
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Mon May 08, 2023 10:34 pm

Re: CPU usage script in terminal

Sat May 13, 2023 12:05 am

:local cpuLoad [/system resource get cpu-load] 
:put $cpuLoad 
Thank you. Thus shows the degree of CPU usage in percent. And to find out how the processor will be loaded in a second, the script needs to be run in a loop and then it will display the result in a new line. But in order to monitor the state of the processor, this is not enough and not convenient. Can you tell me how to make a graphical display similar to displaying the CPU load in Linux with the "htop" command?

Who is online

Users browsing this forum: No registered users and 5 guests