Support Migration Notice: To update migrated JIRA cases click here to open a new case use www.vmware.com/go/sr | vFabric Hyperic 5.7.0 is Now Available

Sigar

add support for lofs and tmpfs filesystems on Solaris

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.6.3
  • Fix Version/s: None
  • Component/s: None
  • Environment:
    Solaris
  • Case Links:
    none

Description

Part of it would be adding to os/solaris/solaris_sigar.c: if (strEQ(type, "(lofs|tmpfs)")) so that these filesystems would be reported. I have no idea how complex it would be beyond that, as both lofs and tmpfs are somewhat "dynamic" (can be moved or changed on the fly, as long as no file handles are open on the volume). lofs is new in Solaris 10, and I think unique to it, at least for now.

Activity

Hide
Doug MacEachern added a comment -

You'll see those with: java -jar sigar.jar df
Note the type will be 'unknown'. So you could put the logic in the caller (e.g. FileSystemDetector) to include these filesystems:

for (int i=0; i<fslist.length; i++) {
FileSystem fs = fslist[i];
String dirName = fs.getDirName();

switch (fs.getType()) { case FileSystem.TYPE_LOCAL_DISK: case FileSystem.TYPE_NETWORK: break; default: + if (!(fs.getDevName().equals("lofs") || fs.getDevName().equals("tmpfs")) continue; }

I might prefer to add a FileSystem.TYPE_TEMPORARY (or similar) for these types so we have something to go on other than 'unknown'. And the caller could check for that type rather than hardcoding the names.
What do you think?

Show
Doug MacEachern added a comment - You'll see those with: java -jar sigar.jar df Note the type will be 'unknown'. So you could put the logic in the caller (e.g. FileSystemDetector) to include these filesystems: for (int i=0; i<fslist.length; i++) { FileSystem fs = fslist[i]; String dirName = fs.getDirName(); switch (fs.getType()) { case FileSystem.TYPE_LOCAL_DISK: case FileSystem.TYPE_NETWORK: break; default: + if (!(fs.getDevName().equals("lofs") || fs.getDevName().equals("tmpfs")) continue; } I might prefer to add a FileSystem.TYPE_TEMPORARY (or similar) for these types so we have something to go on other than 'unknown'. And the caller could check for that type rather than hardcoding the names. What do you think?
Hide
Ian Springer added a comment -

Thanks, Doug. We'll try out using FileSystem.TYPE_UNKNOWN.

Yeah, adding some additional TYPE constants sounds like a good idea, since UNKNOWN isn't really an accurate label for filesystem types we do know something about.

Show
Ian Springer added a comment - Thanks, Doug. We'll try out using FileSystem.TYPE_UNKNOWN. Yeah, adding some additional TYPE constants sounds like a good idea, since UNKNOWN isn't really an accurate label for filesystem types we do know something about.
Hide
Ian Springer added a comment -

For the record, the calls to fs.getDevName() in Doug's above code snippet should be replaced by calls to fs.getSysTypeName().

Show
Ian Springer added a comment - For the record, the calls to fs.getDevName() in Doug's above code snippet should be replaced by calls to fs.getSysTypeName().

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Last comment:
    2 years, 32 weeks, 1 day ago