ranjith520 / remote-linux-monitor

Automatically exported from code.google.com/p/remote-linux-monitor
0 stars 0 forks source link

Remote monitoring fails due to limited options on server's "df" command. #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to log into Linux-based system which uses BusyBox

What is the expected output? What do you see instead?

Expect statistics.  Instead, receive error because "-l" parameter 
is used on "df" command but "-l" is not always an available option.
-l is not available on busybox version of df.

What version of the product are you using? On what operating system?

1.0.2

Please provide any additional information below.

Recommend more graceful error handling where some calls can succeed even if one 
call fails (such as df).  Additionally, recommend allowing modification of 
command line calls through advanced
options so we can work around errors such as this.

Original issue reported on code.google.com by robross0...@gmail.com on 11 Jan 2013 at 7:19

GoogleCodeExporter commented 9 years ago
The -l options does not appear to be doing anything for me.  I will remove it 
from my next build.

Original comment by dbothwell.home@gmail.com on 28 Feb 2013 at 4:49

GoogleCodeExporter commented 9 years ago
See if the attached executable jar runs in your environment.  If so I will post 
it in downloads.

Thanks
Dave

Original comment by dbothwell.home@gmail.com on 28 Feb 2013 at 11:48

Attachments:

GoogleCodeExporter commented 9 years ago
now it fails because -a is not a valid option.  On my version of busybox, the 
only available options are:

        -P      POSIX output format
        -k      1024-byte blocks (default)
        -m      1M-byte blocks
        -h      Human readable (e.g. 1K 243M 2G)

Original comment by robross0...@gmail.com on 1 Mar 2013 at 12:51

GoogleCodeExporter commented 9 years ago
What does your output look like when you run:

uname -a; df -hP

from the BusyBox command line?

Original comment by dbothwell.home@gmail.com on 1 Mar 2013 at 2:48

GoogleCodeExporter commented 9 years ago
login as: root
root@router's password:
Access denied
root@router's password:

Tomato v1.28.0000 MIPSR2-105 K26 USB AIO
root@router:/tmp/home/root# uname -a; df -hP
Linux router 2.6.22.19 #26 Sun Jan 20 03:28:49 CET 2013 mips GNU/Linux
Filesystem                Size      Used Available Capacity Mounted on
/dev/root                 8.3M      8.3M         0 100% /
tmpfs                    29.9M    440.0K     29.5M   1% /tmp
devfs                    29.9M         0     29.9M   0% /dev
/dev/sda5                 2.2T    991.2G      1.1T  46% /opt
/dev/sda1               488.6G    364.1G    124.5G  75% /tmp/mnt/NTFS
root@router:/tmp/home/root#

Original comment by robross0...@gmail.com on 1 Mar 2013 at 4:49

GoogleCodeExporter commented 9 years ago
I was looking at the BusyBox website and making the remote-linux-monitor work 
for it might be a little further outside the box then I want to go.  I think 
the most logical approach would be to fork the software.  If you know Java or 
you know someone who does, I could certainly point them in the right direction 
to tweak the software.

Thanks
Dave 

Original comment by dbothwell.home@gmail.com on 1 Mar 2013 at 5:38

GoogleCodeExporter commented 9 years ago
I do know Java.  I am a senior Java developer.  I might be interested in 
assisting with this if I can find time.

Original comment by robross0...@gmail.com on 1 Mar 2013 at 6:08

GoogleCodeExporter commented 9 years ago
There are 4 classes

SystemInfo
ProcessInfo
FileSystemInfo
ResourceInfo

each class does the following:

1) issue the Linux commands.
2) retrieve the output
3) parse the response
4) assign the parsed tokens to a value class.

I believe all you will need to do is tweak the static member variable "COMMAND" 
and the parsing methods.

I do have a few code changes I was going to check-in tonight. If you would like 
you are certainly welcome to join the project, otherwise as you know you are 
certainly welcome to the code.

Thanks
Dave

Original comment by dbothwell.home@gmail.com on 1 Mar 2013 at 6:59

GoogleCodeExporter commented 9 years ago

Original comment by dbothwell.home@gmail.com on 8 Mar 2013 at 3:53