HowTo: monitor Synology NAS

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

raymond
Posts: 71
Joined: Monday 12 October 2015 15:46
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10232
Contact:

Re: HowTo: monitor Synology NAS

Post by raymond »

mickeyr61 wrote:Ray, thanks for yoyr reply. I have changed the last two digits to .36 and now the Parameter HDUsed is 116. But HDFree and HDFreePerc stay 0.
This is what I have, and some more for comparison, which works for me.

Code: Select all

# Free space volume in GB
            #HDUnit=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.2.1.25.2.3.1.4.36`  # Change OID to .38 on DSM 5.1
            #HDTotal=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.2.1.25.2.3.1.5.36` # Change OID to .38 on DSM 5.1
            #HDUsed=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.2.1.25.2.3.1.6.36`  # Change OID to .38 on DSM 5.1
            #HDFree=$((($HDTotal - $HDUsed) * $HDUnit / 1024 / 1024 / 1024))

            # Send data
            #curl -s -i -H "Accept: application/json" "http://$DOMO_USER:$DOMO_PASS@$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD_SPACE_IDX&nvalue=0&svalue=$HDFree"

            # Free space volume in percent
            HDTotal=`snmpwalk -c $PASSWORD -v2c -O qv $NASIP .1.3.6.1.2.1.25.2.3.1.5.36` # Change OID to .38 on DSM 5.1
            HDUsed=`snmpwalk -c $PASSWORD -v2c -O qv $NASIP .1.3.6.1.2.1.25.2.3.1.6.36`  # Change OID to .38 on DSM 5.1
            HDFreePerc=$((($HDUsed * 100) / $HDTotal))

            # Send data
            curl -s -i -H "Accept: application/json" "http://$DOMO_USER:$DOMO_PASS@$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD_SPACE_PERC_IDX&nvalue=0&svalue=$HDFreePerc"


This should be working for you, or at least test the snmpwalk commands individually.

Ray
ruderik
Posts: 1
Joined: Tuesday 14 June 2016 18:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Contact:

Re: HowTo: monitor Synology NAS

Post by ruderik »

For my DS214play with DSM 6.0 the .36 didn't work correctly, had to change it to .41
This is my storage descriptor table, as you can see .36 is my /tmp

Code: Select all

Name/OID: hrStorageDescr.1; Value (OctetString): Physical memory
Name/OID: hrStorageDescr.3; Value (OctetString): Virtual memory
Name/OID: hrStorageDescr.6; Value (OctetString): Memory buffers
Name/OID: hrStorageDescr.7; Value (OctetString): Cached memory
Name/OID: hrStorageDescr.8; Value (OctetString): Shared memory
Name/OID: hrStorageDescr.10; Value (OctetString): Swap space
Name/OID: hrStorageDescr.31; Value (OctetString): /
Name/OID: hrStorageDescr.36; Value (OctetString): /tmp
Name/OID: hrStorageDescr.37; Value (OctetString): /run
Name/OID: hrStorageDescr.38; Value (OctetString): /dev/shm
Name/OID: hrStorageDescr.41; Value (OctetString): /volume1
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: HowTo: monitor Synology NAS

Post by rednas »

I am trying to get this to work. But the storage is always showing 0 (both the percentage and the normal one).
I have a DS216+ with DSM 6.0.1.
Also installed SnmpB on my Windows laptop to see the tree of my NAS and I can go up to 1.3.6.1.2.1 but then I am not able to find 25..
Can someone help me?
Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 16:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by Erwinvos72 »

Good afternoon everybody,

i saw this awesone script. Andy i was wondering if i could manage my synology with domoticz. Within domoticz i already have added the motherboard sensors and with these i can see my CPU en Memory percentage. So i did the steps according to the wiki for a setup for my 4 drive NAS (Synology DS916+ 8GB), did the chmod and tried to test the script. And it stucks on the line to ping my NAS. I receive a syntax error on Pingtime. When i try to execute it directly from putty i receive the ping time.

I tried it without the ping part but then it directory stucks on the next line. So my question is, is it possible to run this script on domoticz which is installed as a package on the synology i want to monitor.

any suggestions?
Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 16:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by Erwinvos72 »

Anyone suggestions on my above question?
Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 16:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by Erwinvos72 »

I have done some investigating and when i use bash i get the script to run. But it stucks on snmpget, he doesn't know this command. when i try snmpwalk from the putty commandline i'll get the temperature of the disk. So the script is actually working.

But the issue is that on my synology snmpget isn't available. Is it possible to install/include snmpget on my synology so the command can be used. Or is there an other way to get it executed the way it should be.
Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 16:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by Erwinvos72 »

A view days ago i asked some questions but onfortunately no reactions. In the mean time i was able to get the temperature from my 4 NAS disks and put it into domoticz. But i struggle with the space en mem. Those counters don't give the right information.

Anyone?
raymond
Posts: 71
Joined: Monday 12 October 2015 15:46
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10232
Contact:

Re: HowTo: monitor Synology NAS

Post by raymond »

Erwinvos72 wrote:I have done some investigating and when i use bash i get the script to run. But it stucks on snmpget, he doesn't know this command. when i try snmpwalk from the putty commandline i'll get the temperature of the disk. So the script is actually working.

But the issue is that on my synology snmpget isn't available. Is it possible to install/include snmpget on my synology so the command can be used. Or is there an other way to get it executed the way it should be.
I changed all snmpget commands in the bash script itself to snmpwalk one-by-one on my Synology, then it started to work (again). I stated this a few posts earlier also with some example script piece.
Provided that you are running the script on the Synology box itself of course :)
This way you do not have to install anything.
I'm not sure why this has changed on the Synology boxes.

Ray
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: HowTo: monitor Synology NAS

Post by jumbotroll »

Hi.
I have cross compiled snmp packages for synology if you guys want to test.
net-snmp_6.0_5.7.3-2.spk
http://www.jadahl.com/synology6/index.php?fulllist=true
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
TroisSix
Posts: 91
Joined: Monday 11 January 2016 9:29
Target OS: -
Domoticz version: 2022.2
Location: France
Contact:

Re: HowTo: monitor Synology NAS

Post by TroisSix »

Very nice topic, thanks a lot rvmourik, it's working well with my APC ES700 and DS412+ / DSM 6.02 ;)
I retrieve infos like: input voltage, charge, runtime, battery voltage, ... it was quite long to get good informations lol.
The script uses input voltage to give me an alert "no current - battery mode" (with an mail notification every 5 minutes)
So fun ;)
VM Debian - Domoticz stable v2023.1, RFXtrx433, Aeotec Z-Stick Gen5, APC ES700
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 16:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by Erwinvos72 »

Hi everyone,

i got the disk temperature up and running, that wasn't a big part.
The used GB in % is a part of the motherboard sensors so i could add that easy as well (i run domoticz directly on my synology)

Now i am trying to get the available space in GB and % get to work, but i am still stuck in de /1024 /1024 part. With snmpget or snmpwalk i receive an error that is 'kb' and there is missing a ')'

Anyone got this already working and would share this here?
kubrik
Posts: 47
Joined: Wednesday 30 November 2016 15:07
Target OS: Linux
Domoticz version: 2020.2
Location: Italy
Contact:

Re: HowTo: monitor Synology NAS

Post by kubrik »

From cmdline try this command, replacing COMMUNITY and NASIP with your values:

snmpget -v 2c -c COMMUNITY -O qv NASIP 1.3.6.1.2.1.25.2.3.1.4.41
or
snmpget -v 2c -c COMMUNITY -O qv NASIP 1.3.6.1.2.1.25.2.3.1.4.38

and post the result.
Ubuntu 20.04 on ACEPC AK1 (previously RPi3b+)
Z-Stick Gen5, RFXtrx433E, Philips HUE Bridge, Yeelight, ESP8266 NodeMCU, Broadlink RM
dZvents, bash, php, Node-RED
Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 16:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by Erwinvos72 »

Excuse for the delay, i had a short holiday break :-)
Here is the output

1.3.6.1.2.1.25.2.3.1.4.41
No Such Instance currently exists at this OID

1.3.6.1.2.1.25.2.3.1.4.38
4096 Bytes

Extra information:
I use Synology Hybrid Raid and have 4 disks of 3TB. Effictive 8 TB Capacity and 6,8 TB available. But my total isn't shown.
By HDTotal i get 1011689 as value
But when i change the last digit to 37 i also receive 1011689

This also goes for HDUsed.

So i miss the total amount of my SHR
duduf
Posts: 6
Joined: Friday 20 January 2017 11:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.604
Location: Capelle a/d IJssel
Contact:

Re: HowTo: monitor Synology NAS

Post by duduf »

hello, I have trouble with the script. It works wel for a while but for a few mounds anymore. I don't remenber from when it's happend.
I try for now to get the temp from the HDD working but without success. Maybe can someone help me with it.
If i do

Code: Select all

pi@raspberrypi:~$ snmpwalk -v 2c -c public -O qv 192.168.10.94 1.3.6.1.4.1.6574.2.1.1.6
29
29
28
27
29
I see all the temp from my 5 HDD en with .0, .1 etc.. I have got them separately.
Problem is that domoticz don't get the info with the curl....
this is my nas.sh script :

Code: Select all

#!/bin/bash
 # Settings
 
 NASIP="192.168.10.94"        # NAS IP Address
 PASSWORD="public"            # SNMP Password
 DOMO_IP="192.168.10.119"     # Domoticz IP Address
 DOMO_PORT="8080"             # Domoticz Port
 NAS_IDX="135"                # NAS Switch IDX
 NAS_HDD_TEMP_IDX="15"        # NAS HDD Temp IDX
 NAS_HD1_TEMP_IDX="28"        # NAS HD1 Temp IDX
 NAS_HD2_TEMP_IDX="29"        # NAS HD2 Temp IDX
 NAS_HD3_TEMP_IDX="30"        # NAS HD3 Temp IDX
 NAS_HD4_TEMP_IDX="31"        # NAS HD4 Temp IDX
 NAS_HD5_TEMP_IDX="39"        # NAS HD5 Temp IDX
 NAS_HD_SPACE_IDX="132"       # NAS HD Space IDX in Go
 NAS_HD_SPACE_PERC_IDX="136"  # NAS HD Space IDX in %
 NAS_CPU_IDX="133"            # NAS CPU IDX
 NAS_MEM_IDX="134"            # NAS MEM IDX

 
 # Check if NAS in online 
 
 PINGTIME=`ping -c 1 -q $NASIP | awk -F"/" '{print $5}' | xargs`
 
 echo $PINGTIME
 if expr "$PINGTIME" '>' 0
 then
   curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$NAS_IDX" | grep "Status" | grep "On" > /dev/null
 
       if [ $? -eq 0 ] ; then
        echo "NAS already ON"
 
        # Temperature System
        HDtemp1=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.1.2.0`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HDD_TEMP_IDX&nvalue=0&svalue$=$HDtemp1"

		# Temperature HD1
        HDtemp2=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.0`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD1_TEMP_IDX&nvalue=0&svalue$=$HDtemp2"

        # Temperature HD2
        HDtemp3=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.1`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD2_TEMP_IDX&nvalue=0&svalue$=$HDtemp3"

        # Temperature HD3
        HDtemp4=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.2`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD3_TEMP_IDX&nvalue=0&svalue$=$HDtemp4"

        # Temperature HD4
        HDtemp5=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.3`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD4_TEMP_IDX&nvalue=0&svalue$=$HDtemp5"
 
        # Temperature HD5
        HDtemp6=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.4`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD5_TEMP_IDX&nvalue=0&svalue$=$HDtemp6"


        
 
        

		
 
else
        echo "NAS ON"
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$NAS_IDX&switchcmd=On"
 
        # Temperature System
        HDtemp1=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.1.2.0`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HDD_TEMP_IDX&nvalue=0&svalue$=$HDtemp1"

		# Temperature HD1
        HDtemp2=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.0`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD1_TEMP_IDX&nvalue=0&svalue$=$HDtemp2"

        # Temperature HD2
        HDtemp3=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.1`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD2_TEMP_IDX&nvalue=0&svalue$=$HDtemp3"

        # Temperature HD3
        HDtemp4=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.2`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD3_TEMP_IDX&nvalue=0&svalue$=$HDtemp4"

        # Temperature HD4
        HDtemp5=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.3`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD4_TEMP_IDX&nvalue=0&svalue$=$HDtemp5"
 
        # Temperature HD5
        HDtemp6=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.4`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD5_TEMP_IDX&nvalue=0&svalue$=$HDtemp6"

          
        
      fi
 
 else
        curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$NAS_IDX" | grep "Status" | grep "Off" > /dev/null
        if [ $? -eq 0 ] ; then
                echo "NAS already OFF"
                exit
        else
                echo "NAS OFF"
                # Send data
                curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$NAS_IDX&switchcmd=Off"
        fi
 fi
and in domoticz stay everything to 0 :
Knipsel.PNG
Knipsel.PNG (91.4 KiB) Viewed 7614 times
Somebody a idea??
duduf
Posts: 6
Joined: Friday 20 January 2017 11:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.604
Location: Capelle a/d IJssel
Contact:

Re: HowTo: monitor Synology NAS

Post by duduf »

Anyone???
curious
Posts: 132
Joined: Saturday 02 April 2016 19:38
Target OS: -
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by curious »

When I run the script I mostly get the message Timeout : no response
When pinging the ip-adres I get an answer within about .420 ms

Besides that I get an error message :
line 44: ( - ) * / 1024 / 1024 / 1024: syntax error: operand expected (error token is ") * / 1024 / 1024 / 1024")
But that can be caused by the time outs ?

The script in line 43 and 44 is :

Code: Select all

 HDUsed=`snmpget -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.2.1.25.2.3.1.6.41`  # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+
        HDFree=$((($HDTotal - $HDUsed) * $HDUnit / 1024 / 1024 / 1024))
I can't see anything wrong, the only thing I changes is .36 to .41
I have a synology 213J running on DSM 6.0+

NB: When running a single command like :
HDUsed=`snmpget -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.2.1.25.2.3.1.6.41`
I sometimes get a result but not often (time out)
Martijn85
Posts: 53
Joined: Wednesday 20 January 2016 20:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: HowTo: monitor Synology NAS

Post by Martijn85 »

duduf wrote:Anyone???
Do you have turned on SNMP on the NAS?
User avatar
LouiS22
Posts: 433
Joined: Friday 27 February 2015 13:21
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Budapest, Hungary
Contact:

Re: HowTo: monitor Synology NAS

Post by LouiS22 »

I also have problems with this script with my DS416Play with latest firmware. The script partially works, I can get the HDD temp values, but no space used and cpu info. I've tried with .38 and .41 - it's just not working :(
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: HowTo: monitor Synology NAS

Post by epierre »

same for me, time out and no more values... DS216 on DSM 6.0.2-8451 Update 9

snmpwalk -v1 -cpublic 192.168.0.12|grep 1.2.1.25.2.3.1.6
iso.3.6.1.2.1.25.2.3.1.6.1 = INTEGER: 490696
iso.3.6.1.2.1.25.2.3.1.6.3 = INTEGER: 726968
iso.3.6.1.2.1.25.2.3.1.6.6 = INTEGER: 13240
iso.3.6.1.2.1.25.2.3.1.6.7 = INTEGER: 165888
iso.3.6.1.2.1.25.2.3.1.6.10 = INTEGER: 236272
iso.3.6.1.2.1.25.2.3.1.6.31 = INTEGER: 251229
iso.3.6.1.2.1.25.2.3.1.6.32 = INTEGER: 1
iso.3.6.1.2.1.25.2.3.1.6.33 = INTEGER: 856261946
iso.3.6.1.2.1.25.2.3.1.6.34 = INTEGER: 358245396
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
User avatar
AlwinHummels
Posts: 7
Joined: Sunday 22 November 2015 20:25
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Dordrecht, The Netherlands
Contact:

Re: HowTo: monitor Synology NAS

Post by AlwinHummels »

I had the same isue but when I use .54 it works again om my DS 415+ with the last DSM 6.1.15047
Hope it helps

Beneath code I grabbed from the Dutch Synology Forum becouse the memory usage was wrong displayed.

Code: Select all

	       # Free Memory Used in %
       tmpMemAvailable=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.4.6.0`
	   MemAvailable=${tmpMemAvailable%% *}
       tmpMemtotal=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.4.5.0`
	   Memtotal=${tmpMemtotal%% *}
       tmpMemShared=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.4.13.0`
	   MemShared=${tmpMemShared%% *}
       tmpMemBuffer=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.4.14.0`
	   MemBuffer=${tmpMemBuffer%% *}
       tmpMemCached=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.4.15.0`
	   MemCached=${tmpMemCached%% *}
       MemFREE=$(($MemAvailable + $MemShared + $MemBuffer + $MemCached))
       MemUsepercent=$(((($Memtotal - $MemFREE) * 100) / $Memtotal)) 
	   #// For Available use MemUsepercent=$(((($MemFREE) * 100) / $Memtotal))	   
       # Send data
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_MEM_IDX&nvalue=0&svalue=$MemUsepercent"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest