/** Add a Log space. */ void setLogSpace(String logSpaceName, String dirPath) { if (logSpaceName != null && dirPath != null) { String[] dirPaths = new String[1]; dirPaths[0] = dirPath; logSpaceList.put(logSpaceName, dirPaths); } }
private static void addParams( Vector paramlist, String fsName, float totalVal, float usedVal, float freeVal, String capacity, String mountFS) { for (Enumeration en = logSpaceList.keys(); en.hasMoreElements(); ) { String logSpaceName = (String) en.nextElement(); String[] logDirList = (String[]) logSpaceList.get(logSpaceName); for (int i = 0; i < logDirList.length; i++) { String logDirPath = logDirList[i]; // Get actual filesystem name for the directory String fs = (String) filesystemMap.get(logDirPath) + "/"; if (fs != null && fs.equals(mountFS)) { String modifier = logSpaceName + "=" + logDirPath; paramlist.addElement( new PmMeasurement( DIRPATHUSEDSPACENAME, String.valueOf(getDirDiskSpace(logDirPath)), true, modifier)); paramlist.addElement(new PmMeasurement(FILESYSTEMNAME, fsName, true, modifier)); paramlist.addElement( new PmMeasurement(TOTALSPACENAME, String.valueOf(totalVal), true, modifier)); paramlist.addElement( new PmMeasurement(USEDSPACENAME, String.valueOf(usedVal), true, modifier)); paramlist.addElement( new PmMeasurement(AVAILSPACENAME, String.valueOf(freeVal), true, modifier)); paramlist.addElement(new PmMeasurement(USEDCAPACITYNAME, capacity, true, modifier)); } } } }
/** Add a Log space. */ void setLogSpace(String logSpaceName, String[] dirPaths) { if (logSpaceName != null && dirPaths != null) { logSpaceList.put(logSpaceName, dirPaths); } }