#43644: xymon-client port on Mac OS X cannot handle volumes with spaces in name ------------------------------------------------+-------------------------- Reporter: MacPorts.ORG@… | Owner: macports- Type: defect | tickets@… Priority: Normal | Status: new Component: ports | Milestone: MacPorts Resolution: | Future Port: xymon-server, xymon, xymon-client | Version: 2.2.1 | Keywords: xymon ------------------------------------------------+-------------------------- Comment (by MacPorts.ORG@…): This is still a work in progress obviously, but here are the changes I'm working with at the moment. I don't understand some of the original code (why use ''column'' to columnize it?), but at least at this point the "'''[df]'''" and "'''[inode]'''" outputs look 'correct'. The real problem is getting the server to interpret the raw data correctly and match it to my ''analysis.cfg'' rules ... I don't know where in the server code that's done. {{{ macmini:/<4>client/bin % diff -ru xymonclient-darwin.sh.dist xymonclient- darwin.sh --- xymonclient-darwin.sh.dist 2012-08-02 08:51:05.000000000 -0700 +++ xymonclient-darwin.sh 2014-05-09 03:45:09.000000000 -0700 @@ -26,26 +26,36 @@ echo "[who]" who -FILESYSTEMS=`mount | grep -v nobrowse | awk '{print $3}'` +#FILESYSTEMS=`mount | grep -v nobrowse | awk '{print $3}'` +#FILESYSTEMS=`mount | grep -v nobrowse | sed -e 's/^.* on \(.*\) [(].*$/\1/g'` echo "[df]" -set $FILESYSTEMS -(df -H $1; shift - while test $# -gt 0 - do - df -H $1 | tail -1 - shift - done) | column -t -s " " | sed -e 's!Mounted *on!Mounted on!' +#set $FILESYSTEMS +#(df -H $1; shift +# while test $# -gt 0 +# do +# df -H $1 | tail -1 +# shift +# done) | column -t -s " " | sed -e 's!Mounted *on!Mounted on!' + +# XXX [GKE 2/26/2014] +#df -h -t hfs,ntfs | column -t -s " " | sed -e 's!Mounted *on!Mounted on!' +df -P -h -t hfs,ntfs echo "[inode]" -set $FILESYSTEMS -(df -i $1; shift - while test $# -gt 0 - do - df -H $1 | tail -1 - shift - done) | awk ' -NR<2{printf "%-20s %10s %10s %10s %10s %s\n", $1, "itotal", $6, $7, $8, $9} -(NR>=2 && $6>0) {printf "%-20s %10d %10d %10d %10s %s\n", $1, $6+$7, $6, $7, $8, $9}' +#set $FILESYSTEMS +#(df -i $1; shift +# while test $# -gt 0 +# do +# df -H $1 | tail -1 +# shift +# done) | awk ' +#NR<2{printf "%-20s %10s %10s %10s %10s %s\n", $1, "itotal", $6, $7, $8, $9} +#(NR>=2 && $6>0) {printf "%-20s %10d %10d %10d %10s %s\n", $1, $6+$7, $6, $7, $8, $9}' + +# XXX [GKE 2/26/2014] +df -h -i -t hfs,ntfs | awk ' +NR<2{printf "%-20s %10s %10s %10s %10s %s\n", $1, "itotal", $6, $7, $8, $9} +(NR>=2 && $6>0) {printf "%-20s %10d %10d %10d %10s %s %s %s %s\n", $1, $6+$7, $6, $7, $8, $9, $10, $11, $12}' echo "[mount]" mount }}} -- Ticket URL: <https://trac.macports.org/ticket/43644#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X