Hi balu1234,
Welcom to the forum!
I'll echo Neo's comments here, what research have you done and what have you tried?
I'd also add that if you are looking for a converter that will convert any unix command line output to JSON, that is a big ask in no small measure due to the complexity and variety of outputs available in the unix cli.
If you only would like to have this output converted on an occaisional basis, then there are a number of online converters - I usually use this one. This provides a number of output options, I have added the keyed output as an example.
[
{
"Filesystem": "/dev/dsk/c1t0d0s0",
"size": "8.1G",
"used": "4.0G",
"avail": "4.0G",
"capacity": "50%",
"Mounted": "/"
},
{
"Filesystem": "/devices",
"size": "0K",
"used": "0K",
"avail": "0K",
"capacity": "0%",
"Mounted": "/devices"
},
{
"Filesystem": "ctfs",
"size": "0K",
"used": "0K",
"avail": "0K",
"capacity": "0%",
"Mounted": "/system/contract"
},
{
"Filesystem": "proc",
"size": "0K",
"used": "0K",
"avail": "0K",
"capacity": "0%",
"Mounted": "/proc"
},
{
"Filesystem": "mnttab",
"size": "0K",
"used": "0K",
"avail": "0K",
"capacity": "0%",
"Mounted": "/etc/mnttab"
},
{
"Filesystem": "swap",
"size": "3.1G",
"used": "836K",
"avail": "3.1G",
"capacity": "1%",
"Mounted": "/etc/svc/volatile"
},
{
"Filesystem": "objfs",
"size": "0K",
"used": "0K",
"avail": "0K",
"capacity": "0%",
"Mounted": "/system/object"
},
{
"Filesystem": "sharefs",
"size": "0K",
"used": "0K",
"avail": "0K",
"capacity": "0%",
"Mounted": "/etc/dfs/sharetab"
},
{
"Filesystem": "/usr/lib/libc/libc_hwcap1.so.1",
"size": "8.1G",
"used": "4.0G",
"avail": "4.0G",
"capacity": "50%",
"Mounted": "/lib/libc.so.1"
},
{
"Filesystem": "fd",
"size": "0K",
"used": "0K",
"avail": "0K",
"capacity": "0%",
"Mounted": "/dev/fd"
},
{
"Filesystem": "swap",
"size": "3.1G",
"used": "84K",
"avail": "3.1G",
"capacity": "1%",
"Mounted": "/tmp"
},
{
"Filesystem": "swap",
"size": "3.1G",
"used": "32K",
"avail": "3.1G",
"capacity": "1%",
"Mounted": "/var/run"
},
{
"Filesystem": "/dev/dsk/c1t0d0s7",
"size": "11G",
"used": "11M",
"avail": "11G",
"capacity": "1%",
"Mounted": "/export/home"
},
{
"Filesystem": "/vol/dev/dsk/c0t0d0/sol_10_113_x86",
"size": "2.1G",
"used": "2.1G",
"avail": "0K",
"capacity": "100%",
"Mounted": "/cdrom/sol_10_113_x86"
}
]
Regards
Gull04