Community discussions

MikroTik App
 
DanielT
just joined
Topic Author
Posts: 15
Joined: Wed Dec 13, 2017 6:55 pm

System/resource/get value-name query

Thu Jun 08, 2023 12:51 pm

Hi All

I am running v7.9.2 and was trying to return specific details from system/resources using .proplist on API, which was failing. So I did the obvious and tested the relevent command on the router command line - which also returns nothing.

I've tried /system/resources/get value-name="any value" and all return nothing. The general print command works fine and returns all available variables.

I am unable to test using earlier ROS versions

Please validate my findings or correct me :-)

Thanks

Daniel
Last edited by DanielT on Thu Jun 08, 2023 3:00 pm, edited 1 time in total.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: System/resource/get value-name query

Thu Jun 08, 2023 2:51 pm

If you just write /system/resource get uptime it obviously doesn't print anything on terminal, if you don't put ":put" in front of it...
:put [/system/resource get uptime]
(value-name is optional, can be omitted)
Last edited by rextended on Thu Jun 08, 2023 5:44 pm, edited 2 times in total.
 
DanielT
just joined
Topic Author
Posts: 15
Joined: Wed Dec 13, 2017 6:55 pm

Re: BUG? System/resource/get value-name

Thu Jun 08, 2023 2:59 pm

Well. I've just learned something...

I've been using Mikrotik for 15 years and never come across that!

Thanks for putting me in my place - appreciated
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: System/resource/get value-name query

Thu Jun 08, 2023 3:08 pm

I am running v7.9.2 and was trying to return specific details from system/resources using .proplist on API,
I'm sorry, but I don't use the API, so it's better that I don't talk about what I don't know,
but if you open a specific topic with a request for help, surely there is someone who can help you.

REST code

http://192.168.88.1/rest/system/resource
{"architecture-name":"mipsbe","bad-blocks":"0.4","board-name":"RB922UAGS-5HPacD","build-time":"May/30/2023 13:49:00","cpu":"MIPS 74Kc V5.0","cpu-count":"1","cpu-frequency":"720","cpu-load":"0","factory-software":"6.35.1","free-hdd-space":"113979392","free-memory":"91611136","platform":"","total-hdd-space":"134217728","total-memory":"134217728","uptime":"1m22s","version":"7.9.2 (stable)","write-sect-since-reboot":"36","write-sect-total":"2292572"}

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], massinia, ryancccc, zabloc and 62 guests