How to run PathTest on a QNAP.

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.
Post Reply
User avatar
SA-Vintage
New here
Posts: 4
Joined: Mon Jun 20, 2011 2:47 am
Location: Wagenberg, The netherlands
Contact:

How to run PathTest on a QNAP.

Post by SA-Vintage »

Hello,

Maybe the following is helpfull for people who like to measure there local network throughput.
You can use of course iPerf, but the lack of decent (affordable) IOS apps did me decided to search for a better alternative.

Yesterday I've found the AppNeta PathTest App in the Apple Store, installed it (client) on my iPad Mini and run it in server-mode from the command line on my Windows 2008 server (running on VMware).
Because of the network sharing of my physical network adapters with other virtual servers on my home network VMware server I've decided to try run PathTest (server) on my QNAP TS-659 Pro II which has two trunked 1Gb ports (connected to a 24-port HP ProCurve switch) and plenty of bandwidth available.

PathTest is preferable over iPerf because of the more configurable options, you can configure from protocol (TCP, UDP, ICMP) to port number and even QoS settings.
Both the command line programs and the App are free.

It's quite simple to run PathTest on your QNAP.
Below what you need and must do to let it work.

First download files you need (in my case Linux_32-bit.zip (for the QNAP, server), Windows_32-bit.zip (for my Windows machine, client) and the App (for the iPad Mini, client)):

http://www.appneta.com/resources/pathte ... 32-bit.zip

http://www.appneta.com/resources/pathte ... 32-bit.zip

http://www.appneta.com/resources/pathte ... 64-bit.zip

https://itunes.apple.com/nl/app/pathtes ... 35479?mt=8

First check your QNAP if it has the Optware IPKG installed, if not please install it first.

Make a SSH connection to your QNAP for example with Putty, and download Pathtest file to the "/tmp" directory and extract the file.
After extracting the "Linux_32-bit.zip" you find a directory called "/tmp/Linux_32-bit" which contains the "pathtest" program.

If you run the program you will probaly get the following Error:

Code: Select all

[/tmp] # ./pathtest -s
./pathtest: error while loading shared libraries: libcrypto.so.4: cannot open shared object file: No such file or directory
The above Error is of the fact PathTest is expecting libcrypto.so.4 which can be solved by making symbolic links.

Code: Select all

[/] # cd /usr/lib
[/usr/lib] # ln -s libcrypto.so.1.0.0 libssl.so.4
[/usr/lib] # ln -s libcrypto.so.1.0.0 libcrypto.so.4
[/usr/lib] # cd /tmp
[/tmp] # ./pathtest -s
PathTest (TM) v.4.6.0 build 4639
Copyright (c) 2011, AppNeta Inc. All Rights Reserved.

Running in server mode on port 3236 ...
Now your QNAP is running PathTest in server-mode, if you like you can add the "-d" option to run PathTest in Deamon mode.

To test the network throughput of a Windows or Linux machine with PathTest, just run the PathTest (command line) with the "-c" option (pointing to your QNAPs IP-address).

For your IOS device you can install the AppNeta PathTest App (client, graphicall) and point your test to the QNAP with the running PathTest server.
The App works like a charme with a nice interface, albiet with one annoying bug when sending mail with the test results from inside the App.
The recieved mail misses the test results.

The generated data is available on the client and server side, see attachements:
windows_pathtest_output.JPG
ipad_pathtest_output.JPG
I'm not a Linux Guru by far, just a simple Windows network administrator which has some minor Linux skills.
I've moved the PathTest binary to the "/Opt" directory to not to lose it after a reboot of the QNAP.

Still want to resolve three issues:

- the symbolic links are deleted after the QNAP reboot.
- want to autostart PathTest with the boot of the QNAP.
- find a way to save the server-side output to a file.

I will inform you when I solved these three issues.

Have fun!


Greetz René
You do not have the required permissions to view the files attached to this post.
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to run PathTest on a QNAP.

Post by pwilson »

SA-Vintage wrote:Still want to resolve three issues:

- the symbolic links are deleted after the QNAP reboot.
- want to autostart PathTest with the boot of the QNAP.
- find a way to save the server-side output to a file.

I will inform you when I solved these three issues.
Check out the QNAPedia article: Running Your Own Application at Startup for instructions on creating your "autorun.sh" file. Use the MTD-based Method.

You can add commands to your "autorun.sh" file to:
  1. Create those "symlinks" at every NAS restart
  2. autostart PathTest at every NAS restart

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
User avatar
SA-Vintage
New here
Posts: 4
Joined: Mon Jun 20, 2011 2:47 am
Location: Wagenberg, The netherlands
Contact:

Re: How to run PathTest on a QNAP.

Post by SA-Vintage »

Hello Patrick,

Thank you for your response and input.
pwilson wrote:
SA-Vintage wrote:Still want to resolve three issues:
You can add commands to your "autorun.sh" file to:

Create those "symlinks" at every NAS restart
autostart PathTest at every NAS restart
I've edited the "autorun.sh" like below:

Code: Select all

cd /usr/lib
ln -s libcrypto.so.1.0.0 libssl.so.4
ln -s libcrypto.so.1.0.0 libcrypto.so.4
cd /
cd /opt
./pathtest -s -d
After restarting the QNAP the symbolic links are being created correctly.
Unfortunally PathTest does not autostart, neither with the "-d" (Deamon) option or without the Deamon option.

Maybe I'm doing something wrong, I hope you have some idea what this causes.
Thank you in advance.

Greetz René
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to run PathTest on a QNAP.

Post by pwilson »

SA-Vintage wrote:Hello Patrick,

Thank you for your response and input.
pwilson wrote:
SA-Vintage wrote:Still want to resolve three issues:
You can add commands to your "autorun.sh" file to:

Create those "symlinks" at every NAS restart
autostart PathTest at every NAS restart
I've edited the "autorun.sh" like below:

Code: Select all

cd /usr/lib
ln -s libcrypto.so.1.0.0 libssl.so.4
ln -s libcrypto.so.1.0.0 libcrypto.so.4
cd /
cd /opt
./pathtest -s -d
After restarting the QNAP the symbolic links are being created correctly.
Unfortunally PathTest does not autostart, neither with the "-d" (Deamon) option or without the Deamon option.

Maybe I'm doing something wrong, I hope you have some idea what this causes.
Thank you in advance.

Greetz René
I know absolutely nothing about PathTest, so I can't help with that part.

You sure it is in /opt? I would expect it to be in /opt/bin.

ie

Code: Select all

/opt/bin/pathtest -s -d

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
User avatar
SA-Vintage
New here
Posts: 4
Joined: Mon Jun 20, 2011 2:47 am
Location: Wagenberg, The netherlands
Contact:

Re: How to run PathTest on a QNAP.

Post by SA-Vintage »

Hello Patrick,

Thank you agian for your input.
Your help is very much appreciated.
pwilson wrote: You sure it is in /opt? I would expect it to be in /opt/bin.

ie

Code: Select all

/opt/bin/pathtest -s -d
Path was correct, "PathTest" was located in the "/opt".

While searching for a solution I've found a post of you on an another thread were you give a forum member the advise to use the "/share/homes/admin/bin" directory.

So I created the "bin" directory and copied the "PathTest" binary in it.

Code: Select all

# mkdir /share/homes/admin/bin
Opened "vi" to edit the "autorun.sh" file:

Code: Select all

# mount -t ext2 /dev/sdx6 /tmp/config
# vi /tmp/config/autorun.sh
Added the "/share/homes/admin/bin/pathtest -s -d" string to the "autorun.sh" file (the symbolic link commands were allready there and working):

Code: Select all

cd /usr/lib
ln -s libcrypto.so.1.0.0 libssl.so.4
ln -s libcrypto.so.1.0.0 libcrypto.so.4
/share/homes/admin/bin/pathtest -s -d
Saved and unmounted the "autorun.sh" file:

Code: Select all

# chmod +x /tmp/config/autorun.sh
# umount /tmp/config
Restarted the QNAP, and yes it worked!

Code: Select all

[/] # ps cax | grep pathtest
 8257 admin      1520 S   /share/homes/admin/bin/pathtest -s -d
25426 admin       544 R   grep pathtest
[/] #
Below the Top-command showing activity when I started the PathTest client on my Windows machine, which took 2 x 5 seconds.

Code: Select all

Mem: 1045288K used, 2031192K free, 0K shrd, 72388K buff, 451824K cached
Load average: 0.25, 0.12, 0.13    (State: S=sleeping R=running, W=waiting)

  PID USER                                 STATUS   RSS  PPID %CPU %MEM COMMAND
 8257 admin                                S       1520     1 22.0  0.0 pathtest
Now I'm curious if it's possible to route the servers "PathTest" output to a log-file in at a Samba-share, or better email the log-file to an address.
Ill keep you informed.

Patrick, thanks again for your help.


Greetz René
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to run PathTest on a QNAP.

Post by pwilson »

SA-Vintage wrote: Now I'm curious if it's possible to route the servers "PathTest" output to a log-file in at a Samba-share, or better email the log-file to an address.
Both are possible. If you want an example of the e-mail option check out my previous post: Re: Resource report for an example of a BASH script that sends it's output via e-mail.

I don't program in C like you do, but I write a lot of BASH scripts. In fact many people in the Forum use my scripts, even without being requested to do so from myself. I hope my previous message listed above assists you with this project.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
Post Reply

Return to “Miscellaneous”