Description

This article provides information on how to view the available disk space on Junos devices by using an OID.

Solution

If a customer wants the actual size, use the standard Mib2 of:

hrStorageTable OID #1.3.6.1.2.1.25.2.3
The sizes are in sectors; so you will have to use (# * hrStorageAllocationUnits )/1024)/1024) :
hrStorageSize.1 = 452940
(452940*2048) = 927621120 bytes
/1024 = 905880 kilobytes
/ 1024 = 885 megabytes (as seen below in output)

root@sjc-inetfwa> show snmp mib walk 1.3.6.1.2.1.25.2.3
hrStorageIndex.1 = 1
hrStorageIndex.2 = 2
hrStorageIndex.3 = 3
hrStorageIndex.5 = 5
hrStorageIndex.6 = 6
hrStorageIndex.7 = 7
hrStorageIndex.8 = 8
hrStorageIndex.9 = 9
hrStorageIndex.10 = 10
hrStorageIndex.11 = 11
hrStorageIndex.12 = 12
hrStorageIndex.13 = 13
hrStorageType.1 = hrStorageFlashMemory
hrStorageType.2 = hrStorageFixedDisk
hrStorageType.3 = hrStorageFixedDisk
hrStorageType.5 = hrStorageFixedDisk
hrStorageType.6 = hrStorageFixedDisk
hrStorageType.7 = hrStorageFixedDisk
hrStorageType.8 = hrStorageFixedDisk
hrStorageType.9 = hrStorageVirtualMemory
hrStorageType.10 = hrStorageFixedDisk
hrStorageType.11 = hrStorageFixedDisk
hrStorageType.12 = hrStorageFixedDisk
hrStorageType.13 = hrStorageFixedDisk
hrStorageDescr.1 = /dev/ad0s1a: root file system, mounted on: /
hrStorageDescr.2 = /dev/ad0s1e: config file system, mounted on: /config
hrStorageDescr.3 = /dev/ad2s1f: var file system, mounted on: /var
hrStorageDescr.5 = devfs: dev file system, mounted on: /dev
hrStorageDescr.6 = /dev/md0, mounted on: /junos
hrStorageDescr.7 = /cf, mounted on: /junos/cf
hrStorageDescr.8 = devfs: dev file system, mounted on: /junos/dev/
hrStorageDescr.9 = procfs: process file system, mounted on: /proc
hrStorageDescr.10 = /dev/md1, mounted on: /mfs
hrStorageDescr.11 = /var/jail, mounted on: /jail/var
hrStorageDescr.12 = /var/log, mounted on: /jail/var/log
hrStorageDescr.13 = devfs: dev file system, mounted on: /jail/dev
hrStorageAllocationUnits.1 = 2048
hrStorageAllocationUnits.2 = 2048
hrStorageAllocationUnits.3 = 2048
hrStorageAllocationUnits.5 = 512
hrStorageAllocationUnits.6 = 2048
hrStorageAllocationUnits.7 = 2048
hrStorageAllocationUnits.8 = 512
hrStorageAllocationUnits.9 = 4096
hrStorageAllocationUnits.10 = 2048
hrStorageAllocationUnits.11 = 2048
hrStorageAllocationUnits.12 = 2048
hrStorageAllocationUnits.13 = 512
hrStorageSize.1 = 452940
hrStorageSize.2 = 50281
hrStorageSize.3 = 17688697
hrStorageSize.5 = 2
hrStorageSize.6 = 255615
hrStorageSize.7 = 452940
hrStorageSize.8 = 2
hrStorageSize.9 = 1
hrStorageSize.10 = 515348
hrStorageSize.11 = 17688697
hrStorageSize.12 = 17688697
hrStorageSize.13 = 2
hrStorageUsed.1 = 110457
hrStorageUsed.2 = 27
hrStorageUsed.3 = 2707038
hrStorageUsed.5 = 2
hrStorageUsed.6 = 255615
hrStorageUsed.7 = 110457
hrStorageUsed.8 = 2
hrStorageUsed.9 = 1
hrStorageUsed.10 = 479
hrStorageUsed.11 = 2707038
hrStorageUsed.12 = 2707038
hrStorageUsed.13 = 2
hrStorageAllocationFailures.1 = 0
hrStorageAllocationFailures.2 = 0
hrStorageAllocationFailures.3 = 0
hrStorageAllocationFailures.5 = 0
hrStorageAllocationFailures.6 = 0
hrStorageAllocationFailures.7 = 0
hrStorageAllocationFailures.8 = 0
hrStorageAllocationFailures.9 = 0
hrStorageAllocationFailures.10 = 0
hrStorageAllocationFailures.11 = 0
hrStorageAllocationFailures.12 = 0
hrStorageAllocationFailures.13 = 0

Modification History

2020-02-04: Added EX, MX, and QFX series.