4 Replies Latest reply on Dec 29, 2015 3:54 PM by Craig Dockter

    BladeLogic Perl module (NSH.pm) functions

    Craig Dockter

      Did a lot of searching today and did not find this specific information in one place so I thought I'd share.  There are 48 functions within the current Perl module, NSH.pm.  You can get a listing of the functions available (and their usage) on Linux/Unix hosts by using the 'strings' command on the shared library.  Hope this helps and saves somebody time.


      Here is the command I used on Linux (RHEL):


      /usr/bin/strings /usr/lib64/perl5/auto/NSH/NSH.so | grep Usage | sort


      Here is the output of the command.


      Usage: NSH::access (filename, mode)

      Usage: NSH::agent_rel (hostname)

      Usage: NSH::chdir (dirname)

      Usage: NSH::chmod (filename, mode)

      Usage: NSH::chown (filename, uid, gid)

      Usage: NSH::closedir (fd)

      Usage: NSH::close (fd)

      Usage: NSH::creat (filename, mode)

      Usage: NSH::disconnect (host)

      Usage: NSH::dup2(fd1, fd2)

      Usage: NSH::dup (fd)

      Usage: NSH::fchdir (fd)

      Usage: NSH::fchown (fd, uid, gid)

      Usage: NSH::fgets (buffer, nbytes, fd)

      Usage: NSH::flock (fd, op)

      Usage: NSH::fstat (fd)

      Usage: NSH::ftruncate (fd, pos)

      Usage: NSH::getcwd ()

      Usage: NSH::getpriority (which, who)

      Usage: NSH::kill (pid, sig)

      Usage: NSH::link (existing, newname)

      Usage: NSH::lseek (fd, offset, whence)

      Usage: NSH::lstat (name)

      Usage: NSH::mkdir (filename, mode)

      Usage: NSH::mkfifo (filename, mode)

      Usage: NSH::mknod (filename, mode, maj, min)

      Usage: NSH::opendir (dirname)

      Usage: NSH::open (filename, flags = O_RDONLY, mode = 0666)

      Usage: NSH::pclose (fd)

      Usage: NSH::pipe ()

      Usage: NSH::popen (cmd, mode)

      Usage: NSH::readdir (fd)

      Usage: NSH::read (fd, buffer, nbytes)

      Usage: NSH::readlink (filename)

      Usage: NSH::rename (oldname, newname)

      Usage: NSH::rewinddir (fd)

      Usage: NSH::rmdir (filename)

      Usage: NSH::seekdir (fd, pos)

      Usage: NSH::setpriority (who, what, prio)

      Usage: NSH::stat (name)

      Usage: NSH::symlink (name, newname)

      Usage: NSH::system (cmd)

      Usage: NSH::telldir (fd)

      Usage: NSH::truncate (filename, pos)

      Usage: NSH::uname (hostname)

      Usage: NSH::unlink (filename)

      Usage: NSH::utime (filename, mtime, atime)

      Usage: NSH::write (fd, buffer, nbytes)