Short documentation for JWM / Linux

Last Update: 01.05.2017 for version 2.2.8

Contents


Table of Contents
  1. Short documentation for JWM / Linux
    1. Contents
    2. Introduction
    3. Author
    4. Tools Summary
    5. History
    6. Installation
    7. Requirements for JWM / Linux
      1. Linux Distributions tested
      2. Linux Distributions tested (History)
      3. add_os_packages.sh - Script to add missing packages
    8. Using JWM / Linux
      1. Creating a JWM / Linux session
      2. Using JWM commands via jwm.sh
    9. JWM / Linux manServer
    10. Directories in the JWM / Linux archive
    11. Libraries included in JWM / Linux
    12. Tools included in JWM / Linux
    13. Scripts and files include in JWM / Linux
      1. Develop Templates
    14. Scripts and files for the JWM / Linux Environment
    15. Aliase in JWM / Linux
    16. Examples
      1. ack
      2. atop
      3. bmon
      4. bonnie++
      5. busybox
        1. busybox_httpd.sh
      6. bvi
      7. bwm-ng
      8. cdpinfo
      9. cdpr
      10. collectl
        1. collectl - List detailed output
        2. collectl - List processes in tree view
        3. collectl - View process I/O
        4. collectl - View with timestamps
      11. CPUHog
      12. cpumon
      13. cpustat
      14. darkstat
        1. darkstat.sh
      15. dhtest
      16. dmidecode
      17. dstat
      18. fiemap
      19. fio
      20. fnotifystat
      21. forkstat
      22. eventstat
      23. fspy
      24. health-check
      25. hdperf
      26. horst
      27. hostscope
      28. hping2
      29. htop
      30. ibmonitor
      31. iftop
      32. inxi
      33. ifstat
      34. inotifywait / inotifywatch
      35. Intel Performance Counter Monitor
      36. inq
      37. iotop
      38. iozone
      39. ipaudit
      40. ipband
      41. iperf
      42. iperf3
      43. ipscan
      44. iptraf
      45. iptraf-ng
      46. iptstate
      47. itop
      48. JDiskReport
      49. jnettop
      50. justniffer
      51. latencytop
      52. lxtx
      53. lynis
      54. manServer
      55. memconf
      56. mpathstat.py
      57. mtr
      58. netdata
        1. netdata.sh
      59. nethogs
      60. ngrep
      61. nicstat
      62. nload
      63. nmap
      64. netio
      65. netperf
      66. netsniff-ng
      67. nmon
        1. nmonchart
        2. nmonanalyzer
      68. numatop
      69. oprofile
      70. p0f
      71. pagemon
      72. pchar
      73. perftools
      74. pigz
      75. pktstat
      76. powertop
      77. powerstat
      78. prtdiag
      79. pt-diskstats
      80. saidar
      81. screen
      82. smartmontools
      83. smem
      84. smemstat
      85. stress
      86. stress-ng
      87. sysfsutils
      88. sysstat tools
      89. t50
      90. tecmint_monitor.sh
      91. tiptop
      92. tracebox
      93. unfs3
    17. Compiling JWM / Linux
      1. make_tools.sh usage
      2. How to add another tool
      3. How to add another OS library
      4. Check for missing libarires
    18. Create your own tar archive
    19. Hints for Compiling the tools
      1. Compiling justniffer with a boost staging area
      2. Error message : "undefined reference to clock_gettime"
      3. Error message : "error: ‘GENL_ID_GENERATE’ undeclared"
    20. Some howtos for Linux internal tools
      1. Using the ftrace interface with shell commands
    21. Sample output of the compile scripts
      1. Example output of compiling the tools in parallel sessions
      2. Example output of compiling the tools sequential
    22. History archive
    23. Download
    24. Links to other resources
    25. Links to libraries neccessary for JWM
    26. Other tools not included

 


Introduction

JWM / Linux is a collection of various performance and analyze tools for Linux. In addition,  JWM / Linux contains some useful general Linux tools.  These are


JWM / Linux is distributed via tar.gz file so that it can be installed by any user on a Linux machine.

All tools included are compiled and tested under Linux for x86 with 64 Bit (see the list of tested distributions below). For most of the tools the source code is included.

JWM / Linux contains a lot of tools that do the same thing (see here); e.g. there is more then one top replacement, there are multiple tools to monitor the network bandwidth, etc.  Just select the tool that is best for the task you're doing.

Most of the tools included are command line tools for ssh or telnet sessions, some use an internal webserver as user interface, and some are tools with an X Server GUI.

Unfortunately there is no such thing like a "linux binary" that runs on all Linux distributions. Therefore in most cases you must recompile all tools for your distribution.
You can use the script ./compile_scripts/check_for_missing_libs.sh  to check if the libraries required by the tools in JWM / Linux exist in your Linux installation.

Please note that some of the tools included need root privileges (most of them are in the ./sbin directory).

To check for a new version of JWM / Linux and updated documentation visit the JWM / Linux home page http://bnsmb.de/linux/JWM_Linux_documentation.html.


Be aware that this page now heavily uses the "new" html tag <details></details>. Therefor you should use a browser that supports this tag.

<details> Test
If you can see this text and can NOT hide it by clicking on <details> Test above your browser does not support the tag <details></details>.



Author

The collection was created by : Bernd Schemmer

email: Bernd.Schemmer@gmx.de

Homepage: http://bnsmb.de

No changes were done for the source code of the various tools.



Tools Summary


Find below a list of all tools contained in JWM / Linux sorted by usage:


Usage
Tools
General tools
ack, busybox, bvi, pigz, screen, manServer, unfs3
General Monitoring tools collectl, dstat, hostscope, netdata, oprofile, saidar, lxtx,


Hardware information tools dmidecode, inxi, memconf, prtdiag, tecmint_monitor.sh, inq,
Software information tools inxi,
Security tools lynis,


Process List
atop, htop, nmon, cpustat,
Process monitoring tools forkstat, health-check,


Kernel monitoring tools eventstat, itop, latencytop, numatop, perftools, powertop, powerstat, sysstat tools, tiptop,
CPU Monitoring tools CPUMonIntel Performance Counter Monitor,


Memory Monitoring tools smem, smemstat, pagemon,


Network Monitor tools
bwm-ng, darkstat, ibmonitor, iftop, ifstat, ipaud, ipband, iptraf, jnettop, mtr, nethogs, nicstat, nload, pchar, pktstat, tracebox, bmon, iptstate, iptraf-ng,
Network sniffer tools
cdpinfo, cdpr, dhest, ipscan, ngrep, nmap, p0f, justniffer, netsniff-ng, horst (wlan),
Network test tools hping2, t50,


Disk Performance Test bonnie++, fio, hdperf, iozone,
Network performance test tools netio, netperf, iperf3, iperf,
Performance help tools
CPUHog, stress, stress-ng, fio


File Info tools
fiemap,
File access monitoring tools
fnotifystat, fspy, inotifywait
Storage access monitoring tools
iotop, pt-diskstats, mpathstat.py,
Disk Monitoring tools smartmontools,


Tools with WebGUI darkstat, netdata, manServer



History


Date
Version
Comment
01.05.2017/bs 2.2.8 added JDiskReport 1.4.1
added horst 5.0
added lxtx
added mpathstat.py 1.1

removed monit ; the link to download monit is now in the  list with links to other performance 

new version: nmap 7.40
new version: lynis 2.4.8
new version: busybox 1.26.2
new version: iperf3 3.1.7
new version: inq 8.3.0.6
new version: memconf v3.13
new version: sysstat 11.5.5
new version: netdata 1.6.0
new version: inxi 2.3.8
new version: bmon 4.0

updated execute_scripts.sh to version 1.0.2

add_os_package.sh now also supports Arch Linux Distributions (tested with Antergos and Apricity)
add_os_package.sh now also checks for other kornshell derivates like mksh or pdksh
all compile scripts support now the parameter -f or --force to compile the tool even if it's already compiled

added the tar file ${JWM_DIR}/hostscope_jwm_rhel6.tar with compiled hostscope binaries for Linux distributions on which hostscope can not be compiled
01.01.2017/bs
2.2.7
added CPUhog
added stress 1.04
added stress-ng 0.03.11
added forkstat 0.01.15
added cpustat 0.01.28
added powerstat 0.02.10
added smemstat 0.01.15
added eventstat  0.03.03
added pagemon 0.01.10
added fnotifystat 0.01.16
added health-check 0.02.04
added fiemap
added a simple manServer
added sysfsutils 2.1
added unfs3 09.22
added justniffer 0.5.14
added bmon 3.9
added iptstate 2.2.6
added pt-diskstats 2.2.19
added iptraf-ng  1.1.4
added netsniff-ng 0.6.2+
added nmonchart 31
added the Java Nmon Analyzer

new version: tecmint_monitor.sh
new version: smartmontools 6.5
new version: netperf 2.7
new version: dhtest 1.4
new version: inxi 3.02 (Update 08.04.2017/bs: This version number is wrong; should be 2.3.4)
new version: sysstat 11.5.3
new version: hostscope 1.0.0

added a patch to the source for oprofile so that it compiles with GCC-6 also

added the Tools summary table with the tools sorted by usage
added a column with the user interface to the table with the tools
added a column with the release year of the newest version of the tools to the table with the tools
added hints to compile busybox in older Linux versions
added a list with links to other performance tools not included here
added the script jwm.sh
added the script check_for_missing_libs.sh
added the script add_os_packages.sh
added a table with Linux distributions tested

Fixes:

- rearranged the sections in this document: The sections about compiling the tools and adding new tools or libraries are now after the information about the included tools
- fixed some small errors in the scripts
- corrected a nasty bug in the include script jwm_env
- corrected a bug in the compile script for nmon

Be aware that this page now heavily uses the "new" html tag <details></details>. Therefor you should use a browser that supports this tag.

<details> Test
If you can see this text and can NOT hide it by clicking on <details> Test above your browser does not support the tag <details></details>


01.11.2016/bs
2.2.6
added dmidecode 3.0
added prtdiag 1.2
added memconf  3.12
added cdpinfo 1.2
added jnettop 0.13
added nload 0.7.4

added the script netdata.sh for starting or stopping the netdata daemon
added the script darkstat.sh for starting or stopping the darkstat daemon
added the script busybox_httpd.sh for starting or stopping the busybox httpd daemon

new version: T50 5.6.7-fix1
new version: inq 8.3.0
new version: collectl 4.1.0
new version: lynis 2.40

Fixes:

corrected the description for darkstat


...
see the History archive for the previous updates

27.10.2013/bs 1.0.0 first public release
see also the README file in the tar archive
.


Installation


JWM / Linux is delivered in a compressed tar archive.

The name of the tar archive is

jwml_<archive_version>_<distname>_<distrelease>_<cpu_architecture>_<date>.tar.gz

e.g.

jwml_v100_Mint_14_Nadia_3.5.0-17-generic_x86_64_2013-10-26.tar.gz

This is JWM / Linux version v1.0.0 compiled under "MINT 14 Nadia" with kernel patch "3.5.0-17" for "x86_64" created on "2013/10/26".

or

jwml_v226_Fedora_release_23_(Twenty_Three)_4.7.7-100.fc23.x86_64_x86_64_2016-10-26.tar.gz

This is JWM / Linux version 2.2.6 compiled under "Fedora release 23_(Twenty Three)" with kernel patch "4.7.7-100" for "x86_64" created on "2016/10/26".


To use JWM / Linux  download the tar file for your distribution and unpack it using tar with the options -xzf in an empty directory.

If there is no archive with precompiled binaries for your distribution just compile the sources yourself.


Note:

Some of the tools included need a fixed target location while building the binaries. To make sure that every user can install the tools the target directory used for the precompiled binaries is /var/tmp/jwm (/var/tmp is writable by everyone on a Linux machine). Therefor you should install the precompiled tools into the directory  /var/tmp/jwm to be sure that all included binaries work.

This directory is called ${JWM_DIR} or JWM_DIR in the rest of this document.

To change the target location you should compile the tools.



Requirements for JWM / Linux


The tools in JWM / Linux should run on every modern 64 Bit Linux for x86 . Not so common libraries used by the tools are included in the archive.

In addition, the source code for the tools is included in the archive (if available) so that you can create your own binaries.

The script to execute the compile tools is written in ksh -- therefor /bin/ksh is required to compile the tools.

Some make scripts expect sed to be in /usr/bin but in new Linux distributions sed is in /bin. To get around this issue just create a symoblic link:

sudo ln -s /bin/sed /usr/bin/sed

The same is true for mkdir:

sudo ln -s /bin/mkdir /usr/bin/mkdir



To compile the tools the necessary compile tools (gcc, g++, c++, make, bison, flex, yacc) , the kernel headers, and some library header files must be installed.
If the configure script for a tool fails just check the output of the configure script for missing header files, install them, and restart compiling.

You may use the script ./compile_scripts/ add_os_packages.sh to install the missing OS packages for the supported Linux distributions.


The environment is written for bash or ksh.

See also the notes for the tools in the table with the descriptions and the Hints for Compiling the tools below.



Linux Distributions tested

JWM / Linux was compiled on these Linux Distributions:


JWM Version
Date
Linux Distribution
Kernelversion Supported by
add_os_packages?
Comment
2.2.8 07.04.2017 Fedora 25 4.9.13 yes all packages can be compiled; this is the main distribution for development as of 07.04.2017
2.2.8 08.04.2017 Apricity (Arch Linux based Dist 4.10.8 yes all packages can be compiled
2.2.8 08.04.2017 Mint 17 3.19.0 yes all packages can be compiled
2.2.8 08.04.2017 OpenSUSE 12 3.7.10 yes all packages can be compiled except these ones:

horst
hostscope (can be compiled with a current gcc version)
  Note:  Use the binaries from the tar files ${JWM_DIR}/hostscope_jwm_rhel6.tar for this distribution

2.2.8
07.04.2017
Centos 6.9
2.6.32
yes
all packages can be compiled except these ones:

health-check  (kernel not supported)
fnotifystat  (kernel not supported)
hostscope (can be compiled with a current gcc version)
  Note:  Use the binaries from the tar files ${JWM_DIR}/hostscope_jwm_rhel6.tar for this distribution
t50 can not be compiled with the default gcc from this Linux distribution
















Linux Distributions tested (History)

The old versions of JWM / Linux were compiled on these Linux Distributions:

JWM / Linux distributions tested

JWM Version
Date
Linux Distribution
Kernelversion Supported by
add_os_packages?
Comment
2.2.7 25.12.2016 Fedora 23 4.8.13 yes all packages can be compiled; this is the main distribution for development as of 27.12.2016
2.2.7 25.12.2016 Fedora 24 4.8.14 yes all packages can be compiled
2.2.7 27.12.2016 Fedora 25 4.8.15 yes all packages can be compiled
2,2.7 25.12.2016 Mint 18 4.4.0 yes all packages can be compiled
2.2.7 26.12.2016 Mint 17 3.19.0 yes all packages can be compiled
2.2.7 27.12.2016 Debian 8 3.16.0 yes all packages can be compiled
2.2.7 25.12.2016 OpenSUSE 42.2 4.4.36 yes all packages can be compiled
2.2.7 26.12.2016 OpenSUSE 12.3 3.7.10 yes all packages can be compiled
2.2.7 26.12.2016 OpenSUSE 13.2 3.16.6 yes all packages can be compiled
2.2.7 25.12.2016 Oracle Linux Server release 6.5 3.8.13 yes
all packages can be compiled except these ones:

health-check  (kernel not supported)
fnotifystat  (kernel not supported)
hostscope (can be compiled with a current gcc version)
  Note:  Use the binaries from the tar files ${JWM_DIR}/hostscope_jwm_rhel6.tar for this distribution

to compile bmon you must download, compile, and install libnl3 and libconfuse (both libraries are not in the repositories for this distribution)

to compile justniffer you must download boost (the boost in the repositories for this distribution is to old)

see also Libraries neccessary for JWM
2.2.7 26.12.2016 Red Hat Enterprise Linux Workstation release 6.8 (Santiago) 2.6.32 yes
all packages can be compiled except these ones:

health-check  (kernel not supported)
fnotifystat  (kernel not supported)
hostscope  (can be compiled with a current gcc version)
  Note:  Use the binaries from the tar files ${JWM_DIR}/hostscope_jwm_rhel6.tar for this distribution

to compile justniffer you must download boost (the boost in the repositories for this distribution is to old)

t50 only compiles with a current version of gcc; the gcc 4.4.7 does not like pragma statements inside of functions

see also Libraries neccessary for JWM
2.2.7 30.12.2016 Fedora 13 2.6.33 yes all packages can be compiled except these ones:

health-check  (kernel not supported)
fnotifystat  (kernel not supported)
hostscope (can be compiled with a current gcc version)
  Note:  Use the binaries from the tar files ${JWM_DIR}/hostscope_jwm_rhel6.tar for this distribution

to compile bmon you must download, compile, and install libnl3  (the libraries are not in the repositories for this distribution)

to compile justniffer you must download boost (the boost in the repositories for this distribution is to old)

to compile oprofile and stress-ng a new version of the binutils is required

t50 only compiles with a current version of gcc; the gcc 4.4.7 does not like pragma statements inside of functions

see also Libraries neccessary for JWM




add_os_packages.sh - Script to add missing packages

The script ./compile_scripts/ add_os_packages.sh can be used to install the missing packages to compile all tools in JWM / Linux.

Usage:

[26.12.2016 16:19 ] ### The logfile used is /var/tmp/add_os_packages.sh.log
 add_os_packages.sh

 Function: add missing OS packages for compiling JWM
 
 Usage:    add_os_packages.sh [-v|--verbose] [-q|--quiet] [-f|--force] [start|stop|restart|status]

 Parameter:
   -v - verbose mode
   -q - quiet mode
   -f - force execution
   -d - dry-run mode, only print the commands to execute

[26.12.2016 16:19 ] ### The logfile used was /var/tmp/add_os_packages.sh.log
[26.12.2016 16:19 ] ### add_os_packages.sh ended at Mon Dec 26 16:19:17 CET 2016
[xtrnaw7@t540p /var/tmp/jwm/compile_scripts]$

See the table above for the Linux distributions supported by the script. add_os_packages.sh installs all packages that are missing after an initial installation of the distribution without any modifications.

The script asks the user for confirmation before starting the installation.



Using JWM / Linux




Creating a JWM / Linux session


To use JWM / Linux change to the directory with JWM / Linux (the JWM_DIR) and issue

. ./init_session

e.g.

[xtrnaw7@t540p /var/tmp/jwm]$ . init_session
JWM_DIR is "/var/tmp/jwm"
[bash] Starting environment for "JMW / Linux v227 created on Fedora_release_23_(Twenty_Three) 4.7.7-100.fc23.x86_64 x86_64 at 2016-11-17" ...
[bash] Initializing JWM environment ...
[bash] JWM environment initialized. The tools available are:
/var/tmp/jwm/bin:
atop          bwm-ng      fiemap      hdperf       inotifywatch  makelocal  netserver          ocount               opimport     plugins      rvnamed                    stress        total
atopsar       cifsiostat  fileop      hostscope    iostat        monit      nfsiostat-sysstat  opannotate           opjitconv    powerstat    saidar                     stress-ng     tracebox
bmon          cpulimit    fio         hping2       iozone        mpstat     nicstat            oparchive            opreport     protoc       screen                     sysstat       unpigz
bmore         cpumon      fspy        htop         iperf3        ncat       nload              op-check-perfevents  pcap-config  prtdiag      smemstat                   systool
bon_csv2html  cpustat     get_device  ibmonitor    jnettop       ndiff      nmap               operf                pidstat      prtdiag.cfg  statgrab                   tapestat
bon_csv2txt   dlist_test  get_driver  ifstat       justniffer    netio      nmon               opgprof              pigz         ptiptop      statgrab-make-mrtg-config  testlibsysfs
bvi           dstat       get_module  inotifywait  luatracebox   netperf    nping              ophelp               pit_server   rawtime      statgrab-make-mrtg-index   tiptop

/var/tmp/jwm/bin1:
CPUhog.jar  CPUhog.sh  inq  inq.LinuxAMD64  inq.LinuxI386  iodump  ipscan  ipscan-linux64-3.4.2.jar  latencytop-gui  latencytop-tui  pchar  pchar_for_linux26

/var/tmp/jwm/sbin:
biosdecode  darkstat   eventstat    health-check  ipaudit    iptraf      mtr      numatop  pagemon     pcm-memory.x  pcm-pcie.x    pcm-tsx.x  powertop  t50                   vpddecode
bonnie++    dhtest     fnotifystat  hostscoped    ipband     iptstate    nethogs  p0f      pchar       pcm-msr.x     pcm-power.x   pcm.x      smartctl  unfsd                 zcav
cdpr        dmidecode  forkstat     iftop         ipstrings  latencytop  ngrep    p0f.fp   pcm-core.x  pcm-numa.x    pcm-sensor.x  pktstat    smartd    update-smart-drivedb

/var/tmp/jwm/scripts:
ack               collectl                          darkstat.sh              hostscope.sh  iotop.sh              manServer_107.pl  mle.sh             show_kernel_memory
addtimestamp      collectl_top                      execute_on_all_hosts.sh  iotop         itop                  manServer.pl      netdata.sh         smem
busybox_httpd.sh  collectl_top_io                   execute_scripts.sh       iotop-0.4.4   jwm.sh                memconf           pt-diskstats       start_stop_manserver.sh
cdpinfo           compile_justniffer_with_boost.sh  fio_tests.sh             iotop-0.6     manServer_107_ma1.pl  memconf-v3.12.pl  rtp_task_desc.inp  tecmint_monitor.sh

Additional general Linux tools are in the directory /var/tmp/jwm/busybox

Additional performance monitoring tools are in /var/tmp/jwm/perf-tools

[JWM session] [xtrnaw7@t540p /var/tmp/jwm]$

 
Notes:

init_session sets the environment variables PATH, LD_LIBRARY_PATH, MANPATH, and PS1 and defines some useful aliase.

If you want to use the already installed Linux libraries instead of the libraries contained in JWM / Linux set and export the variable LD_LIBRARY_PATH before calling init_session.




Using JWM commands via jwm.sh


To only execute a single command from the JWM / Linux environment without starting a JWM / Linux shell you can use the script ${JWM_DIR}/scripts/jwm.sh.

jwm.sh creates a temporary JWM / Linux environment and then executes the command. The usage for jwm.sh is

[xtrnaw7@t540p /var/tmp/jwm]$ /var/tmp/jwm/scripts/jwm.sh -h
[18.11.2016 17:08 ] ### jwm.sh started at Fri Nov 18 17:08:53 CET 2016
[18.11.2016 17:08 ] ### The logfile used is /var/tmp/jwm.sh.log
 jwm.sh

 Function: exeucte a command in a temporary JWM / Linux environment
 
 Usage:    jwm.sh [-v|--verbose] [-q|--quiet] [-f|--force] command [parameter]

 Parameter:
   -v - verbose mode
   -q - quiet mode
   -f - force execution

[18.11.2016 17:08 ] ### The logfile used was /var/tmp/jwm.sh.log
[18.11.2016 17:08 ] ### jwm.sh ended at Fri Nov 18 17:08:53 CET 2016
[xtrnaw7@t540p /var/tmp/jwm]$


You should create a symbolic link for jwm.sh in a directory that is in your standard path, e.g

sudo ln -s /var/tmp/jwm/scripts/jwm.sh /usr/bin/jwm

Then you can use jwm.sh like this

[xtrnaw7@t540p /var/tmp/jwm]$  jwm  nicstat 1 1
[18.11.2016 17:29 ] ### jwm started at Fri Nov 18 17:29:22 CET 2016
[18.11.2016 17:29 ] ### The logfile used is /var/tmp/jwm.log
    Time      Int   rKB/s   wKB/s   rPk/s   wPk/s    rAvs    wAvs %Util    Sat
17:29:22  enp0s25   12.01    3.06    9.34    6.22  1316.5   504.8  0.01   0.00
17:29:22       lo    2.74    2.74   41.09   41.09   68.30   68.30  0.00   0.00
17:29:22   wlp4s0    0.00    0.00    0.00    0.00   112.5   145.5  0.00   0.00
[18.11.2016 17:29 ] ### The logfile used was /var/tmp/jwm.log
[18.11.2016 17:29 ] ### jwm ended at Fri Nov 18 17:29:22 CET 2016
[xtrnaw7@t540p /var/tmp/jwm]$


Use the parameter -v to get some more information for trouble shooting:

[xtrnaw7@t540p /var/tmp/jwm]$  jwm -v  nicstat 1 1
[18.11.2016 17:29 ] ### jwm started at Fri Nov 18 17:29:38 CET 2016
[18.11.2016 17:29 ] ### The logfile used is /var/tmp/jwm.log
[18.11.2016 17:29 ] INFO: SCRIPTNAME is "jwm"
[18.11.2016 17:29 ] INFO: SCRIPTDIR is "/usr/bin"
[18.11.2016 17:29 ] INFO: REAL_SCRIPTNAME is "/usr/bin/jwm"
[18.11.2016 17:29 ] INFO: REAL_SCRIPTDIR is "/usr/bin"
[18.11.2016 17:29 ] INFO: WORKING_DIR is "/var/tmp/jwm"
[18.11.2016 17:29 ] INFO: RUNNING_IN_TERMINAL_SESSION is "0" (0 = yes, 1 = no)
[18.11.2016 17:29 ] INFO: CUR_USER_ID is "1000"
[18.11.2016 17:29 ] INFO: CUR_USER_NAME is "xtrnaw7"
[18.11.2016 17:29 ] INFO: CUR_GROUP_ID is "1000"
[18.11.2016 17:29 ] INFO: CUR_GROUP_NAME is "xtrnaw7"
[18.11.2016 17:29 ] INFO: ACTION is ""
[18.11.2016 17:29 ] INFO: Using the JWM directory "/var/tmp/jwm"
[18.11.2016 17:29 ] INFO: PATH is now /var/tmp/jwm/scripts:/var/tmp/jwm/bin:/var/tmp/jwm/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/tools/scripts:/tools/bin:/tools/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/xtrnaw7/.local/bin:/home/xtrnaw7/bin
[18.11.2016 17:29 ] INFO: LD_LIBRARY_PATH is now /var/tmp/jwm/lib:
[18.11.2016 17:29 ] INFO: MANPATH is now /var/tmp/jwm/man:/tools/man:
[18.11.2016 17:29 ] INFO: Executing now "nicstat 1 1" ...
    Time      Int   rKB/s   wKB/s   rPk/s   wPk/s    rAvs    wAvs %Util    Sat
17:29:38  enp0s25   12.01    3.06    9.34    6.22  1316.5   504.8  0.01   0.00
17:29:38       lo    2.74    2.74   41.09   41.09   68.30   68.30  0.00   0.00
17:29:38   wlp4s0    0.00    0.00    0.00    0.00   112.5   145.5  0.00   0.00
[18.11.2016 17:29 ] ### The logfile used was /var/tmp/jwm.log
[18.11.2016 17:29 ] ### jwm ended at Fri Nov 18 17:29:38 CET 2016
[xtrnaw7@t540p /var/tmp/jwm]$
 



JWM / Linux manServer


JWM / Linux contains a simple manServer that can be used to view the man pages in a web browser

To use it start a JWM / Linux session

cd /var/tmp/jwm

. init_session


and start the JWM / Linux manServer

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ start_stop_manserver.sh start
[04.11.2016 21:01 ] ### start_stop_manserver.sh started at Fri Nov  4 21:01:38 CET 2016
[04.11.2016 21:01 ] ### The logfile used is /var/tmp/start_stop_manserver.sh.log
[04.11.2016 21:01 ] Starting the JWM manserver ...
export MANPATH="/var/tmp/jwm/share/man:/tools/man::/var/tmp/jwm/perf-tools/man"   
nohup /var/tmp/jwm/scripts/manServer.pl -s 7777 >/tmp/manserver_jwm.log 2>&1 &
echo $! >"/tmp/manserver_jwm.pid"
[04.11.2016 21:01 ] Use "http://localhost:7777" or "http://t540p:7777" to connect to the JWM manserver
[04.11.2016 21:01 ] ### The logfile used was /var/tmp/start_stop_manserver.sh.log
[04.11.2016 21:01 ] ### start_stop_manserver.sh ended at Fri Nov  4 21:01:38 CET 2016
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$



Now you can use your Web Browser to view the man pages, e.g.




To add other man pages to the JWM / Linux manServer use :

MANPATH=$MANPATH:/usr/share/man ./start_stop_manserver.sh --port 7777 start


start_stop_manserver.sh details
Use the parameter status to check the status of the JWM manserver:

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ start_stop_manserver.sh status
[04.11.2016 21:02 ] ### start_stop_manserver.sh started at Fri Nov  4 21:02:11 CET 2016
[04.11.2016 21:02 ] ### The logfile used is /var/tmp/start_stop_manserver.sh.log
[04.11.2016 21:02 ] The JWM manserver already running; the PID is 8378
[04.11.2016 21:02 ] The JWM manserver is listening to the ports:
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:7777            0.0.0.0:*               LISTEN      8378/perl          
[04.11.2016 21:02 ] ### The logfile used was /var/tmp/start_stop_manserver.sh.log
[04.11.2016 21:02 ] ### start_stop_manserver.sh ended at Fri Nov  4 21:02:11 CET 2016
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$



[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ start_stop_manserver.sh stop
[04.11.2016 21:04 ] ### start_stop_manserver.sh started at Fri Nov  4 21:04:37 CET 2016
[04.11.2016 21:04 ] ### The logfile used is /var/tmp/start_stop_manserver.sh.log
[04.11.2016 21:04 ] The JWM manserver is not running
[04.11.2016 21:04 ] ### The logfile used was /var/tmp/start_stop_manserver.sh.log
[04.11.2016 21:04 ] ### start_stop_manserver.sh ended at Fri Nov  4 21:04:37 CET 2016
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$


The usage for the JWM mansever start/stop script is:

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ start_stop_manserver.sh --help
[04.11.2016 21:13 ] ### start_stop_manserver.sh started at Fri Nov  4 21:13:13 CET 2016
[04.11.2016 21:13 ] ### The logfile used is /var/tmp/start_stop_manserver.sh.log
 start_stop_manserver.sh

 Function: start or stop the manserver in JWM / Linux
 
 Usage:    start_stop_manserver.sh [-v|--verbose] [-q|--quiet] [-f|--force] [-p|--port port] [start|stop|restart|status]

 Parameter:
   -v - verbose mode
   -q - quiet mode
   -f - force execution
   -p - port for the JWM manserver, the default port is 7777

[04.11.2016 21:13 ] ### The logfile used was /var/tmp/start_stop_manserver.sh.log
[04.11.2016 21:13 ] ### start_stop_manserver.sh ended at Fri Nov  4 21:13:13 CET 2016
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$





Directories in the JWM / Linux archive


Directory name
Directory contents
Comment
bin
binaries w/ source

bin1
binaries w/o source

busybox
busybox binary and links

collectl*
collectl

compile_scripts
scripts for compiling the tools

data/*
data files for the tools

develop
script templates and other development files

etc
config files for the tools

htdocs
webserver based applications and html pages

include
include files

info
.info files

iotop*
iotop (various versions)

jdiskreport* JDiskReport
lib
libraries for the tools

lib64
symbolic link to lib

lynis*
lynis installation

man
symbolic link to ./share/man

netdata
netdata installation

new
staging directory for new tools

perf-tools
directory with the perftools

sbin
binaries that need root privileges

scripts
well, scripts

share
docs, manpages, etc for the tools

src
source for the tools

workdir
data files and log files for compiling the tools




Libraries included in JWM / Linux

Because not all libraries necessary for the tools are installed on all machines (especially on machines in production environments) some libraries are included in JWM / Linux. The libraries are in the directory ${JWM_DIR}/lib.

As of this writing these libraries are:

Library
Version
Description
Source
libpcap
1.0.0
necessary library for some of the network related tools

Note:

Version 1.0.0 is used here because newer versions do not compile out-of-the box on some Linux Releases.
http://www.tcpdump.org/
libprotobuf
libprotobuf-lite
libprotoc
9.0.1
used by hostscope











The make script for JWM / Linux also copies some OS libraries necessary for some of the tools to the JWM / Linux lib directory. The libraries to copy are listed in the file

${JWM_DIR}/compile_scripts/OS_LIBS

The libraries to copy are [as of 28.03.2017; you may change the file if the libraries are already on the target machines for JWM / Linux ]:

Library
Comment
libtinfo*
libnuma*
liblua*
libnl*

libconfuse*

libnl-3*
libnl-route-3*
libnl-genl-3*
libsctp1*
libnetfilter_conntrack*
libboost_regex*
libboost_regex-mt*
libboost_iostreams*
libboost_program_options*
libboost_program_options-mt*
liburcu*
libcli*
libnet*











The libraries are searched in these directories (in this order for each library):

/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib /usr/local/lib64

To suppress the copying of the libraries create the semaphor file ${JWM_DIR}/lib/_DO_NOT_COPY_LIBS_ prior to calling the make script (or remove the file ${JWM_DIR}/compile_scripts/OS_LIBS).


Tools included in JWM / Linux


Tool
Version
Last
Update
Interface
Description
Source
ack
2.14
2015
cli
ack is a grep replacement written in Perl
http://beyondgrep.com/
atop
2.2.3
2014
cli
top like system monitor
http://www.atoptool.nl/
bvi
1.4rc0
2014
cli
bvi is a vi like editor for binary files
http://bvi.sourceforge.net/
bmon 4.0 2017 cli "bmon is a monitoring and debugging tool to capture networking related statistics and prepare them visually in a human friendly way. It features various output methods including an interactive curses user interface and a programmable text output for scripting."

https://github.com/tgraf/bmon/
bonnie++
1.03e
2001
cli
bonnie++ is a disk performance test tool
http://www.coker.com.au/bonnie++/
busybox
1.26.2
2017
cli BusyBox: The Swiss Army Knife of Embedded Linux

Note:

The config for busybox in the tar archive is the default config without the i2c tools. The make script does not create a new config.

Use

make menuconfig

in the busybox source directory to select which busybox components should be compiled.


Hints for some of the errors I got while compiling busybox on older Linux versions
Error message ‘MTD_FILE_MODE_RAW’ undeclared

-> disable "Miscellaenous Utilities/nandwrite" and "Miscellaenous Utilities/nanddump"

Error message  ‘BLKSECDISCARD’ undeclared

-> disable "Linux System Utilities/blkdiscard"

Error message  sync.c:(.text.sync_main+0x7a): undefined reference to `syncfs'

-> disable "Core Utils/sync"

Error message  nsenter.c:(.text.nsenter_main+0x1b6): undefined reference to `setns'

-> disable "Linux System Utilties/nsenter"

The config without these tools is saved in the file rhel6_config in the busybox source directroy. Use "make menuconfig" in the busybox source directory to use this config.


http://www.busybox.ne
bwm-ng
0.6.1
2015
cli Bandwidth Monitor NG is a small and console-based live network and disk-io bandwidth monitor
http://sourceforge.net/projects/bwmng/
cdpinfo
1.2
2012
cli A perl script to  listen for Cisco Discovery Protocol (CDP) packets and print out key values such as switch, port and vlan
https://github.com/wildajet/scripts/blob/master/cdpinfo
cdpr
2.4
2013
cli Cisco Discovery Protocol Reporter - view and decode CDP packets
http://sourceforge.net/projects/cdpr/
collectl
4.1.0
2016
cli powerfull performance monitoring tool
http://collectl.sourceforge.net/
CPUHog

2013
GUI
Java app. to utilise (waste) as much CPU as it can. The application allows the user to create multiple Java threads, each performing a CPU-intensive task tasks with a selectable memory footprint. The options let you 'thrash' the aspect you want. https://sourceforge.net/projects/cpuhog/
cpumon
2.4
2014
cli monitor cpu usage
http://www.softndesign.org/codes/c/cpumon/
cpustat
0.01.28
2015
cli cpustat periodically dumps out the current CPU utilisation statistics of running processes. cpustat has been optimised to have a minimal CPU overhead and typically uses about 35% of the CPU compared to top. cpustat also includes some simple statistical analysis options that can help characterise the way CPUs are being loaded. https://github.com/ColinIanKing/cpustat
darkstat
3.0.719
2015
WebGUI
Captures network traffic, calculates statistics about usage, and serves reports over HTTP.

Use darkstat.sh to start or stop the darkstat daemon.

http://unix4lyfe.org/darkstat/

dhtest
1.4
2015
cli DHCP Test client
https://github.com/saravana815/dhtest
dmidecode
3.0
2015
cli Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard (see a sample output) http://www.nongnu.org/dmidecode/
dstat
0.7.3
2016
cli Resource statistic tool
http://dag.wieers.com/home-made/dstat/
eventstat 0.03.03
2016
cli Eventstat periodically dumps out the current kernel event state. It keeps track of current events and outputs the change in events on each output update. The tool requires sudo to run since it needs to write to /proc/timer_stats to start and stop the event monitoring. http://kernel.ubuntu.com/~cking/eventstat/
fiemap

2016
cli
Reads file extents using the FIEMAP ioctl
https://github.com/ColinIanKing/fiemap
fio
2.1.7
2014
cli benchmark tool
http://freecode.com/projects/fio
fnotifystat 0.01.16
2016
cli Fnotifystat is a program that dumps the file system activity in a given period of time.

Note:
The make script aborts the compilation if the file fanotify.h is not found in /usr/include or one of the sub directories. This file is missing in older Linux versions

http://kernel.ubuntu.com/~cking/fnotifystat/
forkstat
0.01.15
2016
cli Forkstat is a program that logs process fork(), exec() and exit() activity. It is useful for monitoring system behaviour and to track down rogue processes that are spawning off processes and potentially abusing the system.

Note that forkstat uses the Linux netlink connector to gather process activity and this may miss events if the system is overly busy. Netlink connector also requires root privilege.
http://kernel.ubuntu.com/~cking/forkstat/
fspy
0.1.1



2010
cli fspy is an easy to use linux filesystem activity monitoring tool which is meant to be small, fast and to handle system resources conservative. you can apply filters, use diffing and your own output format in order to get the best results.
https://www.security-database.com/toolswatch/fspy-v0-1-1-linux-filesystem.html
hdperf
1.5
2013
cli harddrive performance benchmark
http://sourceforge.net/projects/hdperf/
health-check 0.02.04
2016
cli The health-check tool monitors processes in various ways to help identify areas where it is consuming too many resources. One can trace one or more processes (including all their threads and child processes too) for a full story of system activity.

Note:
The make script aborts the compilation if the file fanotify.h is not found in /usr/include or one of the sub directories. This file is missing in older Linux versions


http://kernel.ubuntu.com/~cking/health-check/
horst 5.0 2016 cli horst is a small, lightweight IEEE802.11 WLAN analyzer with a text interface. https://github.com/br101/horst
hostscope
1.0.0
2015
cli, network
hostscope displays key system metrics of Linux hosts, such as detailed CPU load, speed and temperature, I/O rates of network interfaces, I/O rates of disks, and user process summary information. All metrics are multicast on the LAN, if wanted, and clients can switch between multiple hosts on the network.

http://www.maier-komor.de/hostscope.html
hping2
2.0.0
2006
cli command-line oriented TCP/IP packet assembler/analyzer http://www.hping.org/
htop
2.0.1
2016
cli top like system monitor
http://htop.sourceforge.net/
ibmonitor
1.4
2006
cli ibmonitor is an interactive linux console application which shows
bandwidth consumed and total data transferred on all interfaces.
http://ibmonitor.sourceforge.net/index.html
ifstat
1.1
2004
cli report network interface bandwidth
http://gael.roualland.free.fr/ifstat/
iftop
1.0pre4
2014
cli report network interface bandwidth http://www.ex-parrot.com/pdw/iftop/
inxi
2.3.8
2017
cli inxi - the universal, portable, system information tool for console and irc.

http://smxi.org/

inotify
3.14
2010
cli

inotify-tools is a C library and a set of command-line programs for Linux providing a simple interface to inotify. These programs can be used to monitor and act upon filesystem events. ...
The programs are written in C and have no dependencies other than a Linux kernel supporting inotify.

inotify-tools 3.14 is the latest version, released on the 7th of March 2010.

inotify is a file change notification system in the Linux kernel, available since version 2.6.13

To check whether your own kernel version supports Inotify as well, you can run the following command:

% grep INOTIFY_USER /boot/config-$(uname -r)
CONFIG_INOTIFY_USER=y
https://github.com/rvoicilas/inotify-tools/wiki

see also:

http://www.infoq.com/articles/inotify-linux-file-system-event-monitoring
inq
8.3.0.6

2017
cli disk inquiry program from EMC,

Notes:
The archive contains only the 32bit binary and the 64bit binary
The 32 Bit Version is still 7.6.2.0


ftp://ftp.emc.com/pub/symm3000/inquiry/

(no source code available)
Intel PCM
2.11
2012
cli Intel Performance Counter Monitor
https://software.intel.com/en-us/articles/intel-performance-counter-monitor/
iotop
0.4.4
2013
cli Iotop is a Python program with a top like UI used to show of behalf of which process is the I/O going on.

Be aware of the requirements for this iotop version:

"It requires Python >= 2.5 (or Python >= 2.4 with the ctypes module) and a Linux kernel >= 2.6.20 with the CONFIG_TASK_DELAY_ACCT CONFIG_TASKSTATS,
CONFIG_TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS options on."

http://guichaz.free.fr/iotop/
iotop
0.6
2013
cli Iotop is a Python program with a top like UI used to show of behalf of which process is the I/O going on.

Be aware of the requirements for this iotop version:

"It requires Python >= 2.7 and a Linux kernel >= 2.6.20 with the CONFIG_TASK_DELAY_ACCT CONFIG_TASKSTATS,
CONFIG_TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS options on."

http://guichaz.free.fr/iotop/
iozone
3_465
2016
cli IOzone is a filesystem benchmark tool
http://iozone.org/
ipaudit
1.1
2016
cli IPAudit monitors network activity on a network by host, protocol and port. http://ipaudit.sourceforge.net/
ipband
0.8.1
2008
cli ipband is a pcap based IP traffic monitor. http://ipband.sourceforge.net/
iperf 2.05 2005 cli iperf is a tool for active measurements of the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, protocols, and buffers. For each test it reports the bandwidth, loss, and other parameters. https://sourceforge.net/projects/iperf/
iperf3 3.1.7 2017 cli iperf3 is a tool for active measurements of the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, protocols, and buffers. For each test it reports the bandwidth, loss, and other parameters. https://github.com/esnet/iperf
ipscan
3.4.2
2016
GUI
A cross-platform network scanner that is fast and simple to useiptrfff
https://sourceforge.net/projects/ipscan/
iptraf
3.0.0
2005
cli IPTraf is a console-based network statistics utility for Linux. http://iptraf.seul.org/index.html
iptraf-ng 1.1.4 2013 cli iptraf-ng is a fork of original iptraf-3.0.0
https://fedorahosted.org/iptraf-ng/
iptstate 2.2.6 2016 cli IPTState is a top-like interface to your netfilter connection-tracking table. https://www.phildev.net/iptstate/index.shtml
itop

2012
cli itop monitors the interrupts of a system in real time
http://www.void.gr/kargig/blog/2012/06/24/interrupts-top-like-utility-for-linux/
JDiskReport 1.1.4 2014 GUI "JDiskReport enables you to understand how much space the files and directories consume on your disk drives, and it helps you find obsolete files and folders.

The tool analyses your disk drives and collects several statistics which you can view as overview charts and details tables."

http://www.jgoodies.com/freeware/jdiskreport/
jnettop
0.13
2006
cli nettop is a traffic visualiser, which captures traffic going through the host it is running from and displays streams sorted by bandwidth they use.
http://jnettop.kubs.info/wiki/
justniffer 0.5.14 2014 cli justniffer is a network sniffer

Hint for compiling justniffer
Compiling justniffer requires boost  version 1.46 or newer.
If you do not want to install a new boost version you can compile justniffer using a boost staging area.

See also the hint below regarding GENL_ID_GENERATE.

http://justniffer.sourceforge.net/

https://sourceforge.net/projects/justniffer/?source=directory
latencytop
0.5
2009
cli view process latencies
http://www.latencytop.org

[27.10.2013/bs: The web site is not available]

http://git.infradead.org/latencytop.git
lxtx 1.1.12 2016 cli A simple command line program, like vmstat, sar, or iostat.

Note:
There is no source code available for this tool.

http://ontune.us/lxtx/
lynis
2.4.8
2017
cli Lynis is a security auditing tool for UNIX derivatives like Linux, macOS, BSD, Solaris, AIX, and others https://cisofy.com/download/lynis/
manServer
1.07 ma1
2006
WebGUI
manServer - convert manual pages to HTML for viewing with a web browser. Use start_stop_manserver.sh to start or stop the JWM / Linux manServer.

A copy of this page is in the directory ./htdocs.

Note: the download link on that page does NOT work.

Working Download Link (05.11.2016)

http://www.filewatcher.com/m/manServer.pl.63487-0.html
memconf
3.13
2017
cli Identify sizes of memory modules installed on a Solaris, Linux, FreeBSD or HP-UX workstation or server. http://sourceforge.net/projects/memconf/
mpathstat.py 1.1 2016 cli Python script to sort the output of iostat for better monitoring of mulitpathed devices http://prefetch.net/blog/index.php/2016/10/24/displaying-multi-path-statistics-on-linux-systems/
mtr
0.85
2015
cli mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool. http://www.bitwizard.nl/mtr/
netdata
1.6.0
2017
WebGUI real time performance monitoring in a Web dashboard

Very short netdata usage help
To use netdata start the daemon:

/var/tmp/jwm/netdata/usr/bin/netdata

(or use the script netdata.sh)

Then connect via WebBrowser to

http://127.0.0.1:19999/

To view the config use:

http://127.0.0.1:19999/netdata.conf


https://github.com/firehol/netdata
nethogs
0.8.0
2015
cli
NetHogs is a small 'net top' tool https://github.com/raboof/nethogs#readme
netio
1.32
2012
cli
network benchmark tool

Note:

For 10 GB connections netio is not that useful; use one of the other tools (for example netperf instead)
http://www.ars.de/ars/ars.nsf/docs/netio






netperf
2.7.0
2015
cli network benchmark tool
http://www.netperf.org/netperf
netsniff-ng 0.6.2+ 2015 cli netsniff-ng is a free Linux networking toolkit, a Swiss army knife for your daily Linux network plumbing if you will.

Hints for compiling netsniff-ng
netsniff-ng does not compile with the libraries and headers from JWM / Linux . You must install the latest version of the libraries to compile netsniff-ng.

http://netsniff-ng.org/
ngrep
1.45
2006
cli grep for network traffic
http://ngrep.sourceforge.net/
nicstat
1.95
2014
cli Network traffic statics utility for Solaris and Linux http://sourceforge.net/projects/nicstat/
nload
0.7.4
2012
cli nload is a console application which monitors network traffic and bandwidth usage in real time. It visualizes the in- and outgoing traffic using two graphs and provides additional info like total amount of transfered data and min/max network usage.
http://www.roland-riegel.de/nload/index.html
nmap
7.40

cli network port scanner
http://nmap.org/
nmon
16f
2016
cli Nigel's performance Monitor for Linux

Hint for compiling nmon

The source code for nmon version 15+ uses functions from the math library but does not link the necessary lib for that, so compiling nmon ends with an error:

cc -o nmon_power_rhel3 lmon.c -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -g -D POWER
/tmp/ccLo9PxQ.o: In function `main':
/var/tmp/jwm/src/nmon/lmon.c:5616: undefined reference to `ceilf'
collect2: error: ld returned 1 exit status

To get around this edit the makefile and change the line

LDFLAGS=-lncurses -g

to

LDFLAGS=-lncurses -g -lm



Included are also nmonchart:

"nmonchart is a Korn shell script for AIX or Linux to convert nmon collected files to a webpage (.html) including Google Chart and JavaScript to display the top 53+ AIX and Linux Performance Graphs and configuration details"

and the Java Nmon Analyzer

"The Java Nmon analyser is a free, open source analyser tool which is helpful in analyzing performance data captured using the nmon performance tool. and real-time monitor the Linux/AIX 's performance base on nmon."

There are other tools to use the data collected by nmon - see the list of other tools not included in JWM / Linux below.

nmon and nmon chart:

http://nmon.sourceforge.net/pmwiki.php

nmon Analyzer:

https://sourceforge.net/projects/jnmonanalyser/
numatop
1.0.4
2015
cli NumaTOP is an observation tool for runtime memory locality characterization and analysis of processes and threads running on a NUMA system. It helps the user characterize the NUMA behavior of processes and threads and identify where the NUMA-related performance bottlenecks reside.

NumaTOP Requirements
NumaTOP requires a special patch which supports PEBS Load Latency functionality.

The patch has not been integrated in 3.8 (probably it will be integrated
in 3.9).

Numatop is supported on Intel Xeon processors: 5500-series, 6500/7500-series,
5600 series, E7-x8xx-series, and E5-16xx/24xx/26xx/46xx-series.

E5-16xx/24xx/26xx/46xx-series had better be updated to latest CPU microcode
(microcode must be 0x618+ or 0x70c+).


https://01.org/numatop
oprofile 1.1.0 2015 cli OProfile is a system-wide profiler for Linux systems, capable of profiling all running code at low overhead

Note:

The binary operf will only be compiled if the kernel supports the neccessary events.

Note 24.12.2016

Added the patch from

https://patchwork.openembedded.org/patch/122253/

so that oprofile also compiles with GCC-6
http://oprofile.sourceforge.net/news/
p0f
3.08b
2014
cli P0f is a tool that utilizes an array of sophisticated, purely passive traffic fingerprinting mechanisms to identify the players behind any incidental TCP/IP communications (often as little as a single normal SYN) without interfering in any way. Version 3 is a complete rewrite of the original codebase, incorporating a significant number of improvements to network-level fingerprinting, and introducing the ability to reason about application-level payloads (e.g., HTTP).
http://lcamtuf.coredump.cx/p0f3/
pagemon
0.01.10
2016
cli "pagemon is an interactive memory/page monitoring tool allowing one to browse the memory map of an active running process on Linux.
https://github.com/ColinIanKing/pagemon
pchar
1.5
2005
cli pchar is a tool to characterize the bandwidth, latency, and loss of links along an end-to-end path through the Internet.

Hint for compiling pchar
If compiling pchar with make fails with saying something like "SO_BSDCOMPAT not defined" temporary add

#define SO_BSDCOMPAT    14

to the file

/usr/include/asm-generic/socket.h

The compile script in JWM / Linux adds this statement to the include file pc.h from pchar if neccessary.


http://www.kitchenlab.org/www/bmah/Software/pchar/
perftools
(2014/11/08)
2014
cli Performance analysis tools based on Linux perf_events (aka perf) and ftrace (Brendan Gregg)
https://github.com/brendangregg/perf-tools
pigz
2.3.4
2016
cli parallel gzip
http://zlib.net/pigz/
pktstat
1.8.5
2012
cli pktstat displays a real-time list of active connections seen on a network interface, and how much bandwidth is being used by what.

It partially decodes HTTP and FTP protocols to show what filename is being transferred, as well as X11 application names. Entries hang around on the screen for a few seconds so you can see what just happened, in short a very useful tool to figure out network connection in real time.

http://linuxpoison.blogspot.de/2010/12/top-like-utility-to-monitor-network.html
powertop
2.8
2015
cli

PowerTOP is a Linux tool to diagnose issues with power consumption and power management.

In addition to being a diagnostic tool, PowerTOP also has an interactive mode where the user can experiment various power management settings for cases where the Linux distribution has not enabled these settings.

https://01.org/powertop/
powerstat
0.02.10
2016
cli "Powerstat measures the power consumption of a machine using the battery stats or the Intel RAPL interface. The output is like vmstat but also shows power consumption statistics. At the end of a run, powerstat will calculate the average, standard deviation and min/max of the gathered data." https://github.com/ColinIanKing/powerstat
prtdiag
1.2
2003
cli prtdiag is a little script that displays the hardware configuration and status of a running machine.
http://people.redhat.com/tcallawa/prtdiag/
pt-diskstats 2.2.19
cli view disks I/O . This version is (from percona-toolkit 2.2.19.

Percona Toolkit is a collection of advanced command-line tools used by Percona (http://www.percona.com/) support staff to perform a variety of MySQL and system tasks that are too difficult or complex to perform manually.
https://www.percona.com/doc/percona-toolkit/2.1/pt-diskstats.html
saidar
0.91
2004
cli top like monitoring tool
http://www.i-scream.org/libstatgrab/
screen
4.0.3

cli screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.

Hint for compiling screen
To compile screen the include file /usr/include/sys/stropts.h is necessary but in standard Linux distributions this file does not exist. To get around this bug do

sudo mkdir -p /usr/include/sys
sudo touch /usr/include/sys/stropts.h



https://www.gnu.org/software/screen/
smartmontools
6.5
2016
cli smartmontools contains utility programs (smartctl, smartd) to control/monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI disks. It is derived from smartsuite. http://sourceforge.net/projects/smartmontools/
smem
1.4
2013
cli

smem is a tool that can give numerous reports on memory usage on Linux systems. Unlike existing tools, smem can report proportional set size (PSS), which is a more meaningful representation of the amount of memory used by libraries and applications in a virtual memory system.

Because large portions of physical memory are typically shared among multiple applications, the standard measure of memory usage known as resident set size (RSS) will significantly overestimate memory usage. PSS instead measures each application's "fair share" of each shared area to give a realistic measure.

https://www.selenic.com/smem/
smemstat
0.01.15
2016
cli Smemstat reports the physical memory usage taking into consideration shared memory. The tool can either report a current snapshot of memory usage or periodically dump out any changes in memory.
http://kernel.ubuntu.com/~cking/smemstat/
stress
1.0.4
2014
cli stress is a deliberately simple workload generator for POSIX systems. It imposes a configurable amount of CPU, memory, I/O, and disk stress on the system. It is written in C, and is free software licensed under the GPLv2. http://people.seas.harvard.edu/~apw/stress/https://sourceforge.net/projects/linux-diag/files/sysfsutils/sysfsutils-2.0.0/
stress-ng
0.03.11
2015
cli stress-ng will stress test a computer system in various selectable ways.

Hints for compiling stress-ng
If you get the error message

stress-rdrand.c:49: Error: no such instruction: `rdrand %rax'

then the installed binutils are too old. Update the binutils (see Links_to libraries neccessary for JWM below)  and try again

http://kernel.ubuntu.com/~cking/stress-ng/
sysfsutils 2.1.0 2006 cli This package's purpose is to provide a set of utilities for interfacing
with sysfs
https://sourceforge.net/projects/linux-diag/files/sysfsutils/
sysstat
11.5.5
2017
cli misc. tools :
cifsiostat mpstat iostat pidstat sysstat tapestat
http://sebastien.godard.pagesperso-orange.fr/
t50
5.6.7-fix1
2016
cli T50 - Experimental Mixed Packet Injector

T50 (f.k.a. F22 Raptor) is a tool designed to perform "Stress Testing"

https://sourceforge.net/projects/t50/
tecmint_monitor.sh
0.1
2016
cli A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux
http://www.tecmint.com/linux-server-health-monitoring-script/

https://github.com/atarallo/TECMINT_MONITOR/
tiptop
2.3

cli Tiptop is a performance monitoring tool for Linux.  It provides a dynamic real-time view of the tasks running in the system. Tiptop is very similar to the top utility, but most of the information displayed comes from hardware counters.

Requirements:  Linux 2.6.31+
http://tiptop.gforge.inria.fr/
tracebox
git repository cloned 06.03.2014
2014
cli tracebox — A Middlebox Detection Tool

Hint for compiling tracebox
If the configure script complains about a missing file crafterconfig.h.in do

  cd /var/tmp/jwm/src/tracebox/noinst/libcrafter/libcrafter
  touch crafterconfig.h.in


Then execute the configure script again.

If you get an compile error like this

lua.cc:165:28: error: ‘luaL_register’ was not declared in this scope

try compiling tracebox with lua 5.2, e.g:

cd /var/tmp/jwm/src/tracebox
( export LUA_INCLUDE=-I/usr/include/lua5.2 ;  export LUA_LIB=-llua5.2 ; export LUA=/usr/bin/lua5.2 ; ./configure --prefix=/var/tmp/jwm )


http://www.tracebox.org/






unfs3
0.9.22

cli
Userspace NFS3 daemon
http://unfs3.sourceforge.net/



Scripts and files include in JWM / Linux


Script
Purpose
Comment
./scripts/addtimestamp
add a timestamp to every output line of an executable

./scripts/busybox_httpd.sh start or stop the busybox httpd daemon
the htdocs directory for the httpd daemon is ${JWM_DIR}/htdocs
./scripts/collectl
wrapper script to call collectl

./scripts/collectl_top
call collectl with top like output

./scripts/collectl_top_io
call collectl with top like output with I/O

./scripts/darkstat.sh
start or stop the darkstat daemon

./scripts/execute_on_all_hosts.sh
execute a script or command on multiple hosts

./scripts/execute_scripts.sh
execute one or more executables in parallel or sequential sessions

./scripts/iotop*
shell scripts to start iotop

./scripts/netdata.sh
start or stop the netdata daemon

./scripts/start_stop_manserver.sh
start or stop the JWM manServer

./scripts/compile_justniffer_with_boost.sh script to compile justniffer with a boost staging area
./scripts/jwm.sh script to execute a command in a temporay JWM / Linux environment
./compile_scripts/check_for_missing_libs.sh script to check for missing libraries
./compile_scripts/add_os_packages.sh script to install the OS packages required to compile all tools included in JWM / Linux

Note:

The scripts in the directory ./scripts not listed in the table above are part of one of the tools listed below


Develop Templates


These files/scripts can be used as template for new scripts

Script / file
Purpose
Comment
./develop/ksh_mini_template.sh
simple template for a start/stop script for the ksh ; the template can also be used for other purposes

./develop/scriptt.sh
complex kornshell script template with lots of predefined variables and functions

./develop/send_monitor_login_mail.sh
a sample script to monitor a log file

./compile_scripts/compile_tool.template
a template for new compile scripts






Scripts and files for the JWM / Linux Environment

This table list the files and scripts that make up the JWM / Linux environment:

File
Type
Purpose
Comment
compile_tools.sh
script
simple wrapper script for make_tools.sh





create_archive.sh
script
create a new archive

init_session
script
start a JWM / Linux session

JWM_DESC
textfile
contains the description of the archive; this file will be (re)created by create_archive.sh before creating the new archive

jwm_env
include script
this is the include script for all other scripts in JWM / Linux that defines the necessary variables and some general functions

JWM_Linux_documentation.html
HTML page
this file

README
textfile
readme file for JWM / Linux

VERSION
textfile
contains the version of the JWM / Linux archive

NO_COMPILE_LIST
textfile
file with the list of packages that should not be compiled

compile_scripts/make_tools.sh
main script to compile the tools

compile_scripts/check_compile_status
script
view the compile status

compile_scripts/compile_<toolname>.sh script
compile the tool <toolname>

compile_scripts/start_compiling.sh
script
help script for the compile process

Note:

This script is used to compile the libraries included in JWM / Linux and copy the requried OS libraries to the JWM / Linux lib directory.

compile_scripts/jwml_include.inc script
include script for the compile scripts

compile_scripts/compile_tool.template
script
template for a compile script

./lib/_DO_NOT_COPY_LIBS_
file
semaphore file to request make_tools.sh NOT to copy the OS libraries

compile_scripts/OS_LIBS
textfile
list of OS libraries that should be copied to the JWM / Linux lib directory




Aliase in JWM / Linux


The JWM / Linux init script init_session defines the following aliase:

Alias
Purpose
Comment
jwm_version
print the version of the installed JWM archive

jwm_tools
list the tools in the current JWM environment

jwm_dir
print the the JWM / Linux base directory

jwm_home
change the working directory to the JWM / Linux base directory







Examples

This section contains the usage and some usage examples for the tools included in JWM / Linux. For more indepth information see either the man page or the documentation on the websites for the tools.


Note:

Most of the examples are copied from the documentation for the tools.


ack

ack is a replacement for grep written in Perl.

ack usage
The usage help is:

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./ack --help
Usage: ack [OPTION]... PATTERN [FILES OR DIRECTORIES]

Search for PATTERN in each source file in the tree from the current
directory on down.  If any files or directories are specified, then
only those files and directories are checked.  ack may also search
STDIN, but only if no file or directory arguments are specified,
or if one of them is "-".

Default switches may be specified in ACK_OPTIONS environment variable or
an .ackrc file. If you want no dependency on the environment, turn it
off with --noenv.

Example: ack -i select

Searching:
  -i, --ignore-case             Ignore case distinctions in PATTERN
  --[no]smart-case              Ignore case distinctions in PATTERN,
                                only if PATTERN contains no upper case.
                                Ignored if -i is specified
  -v, --invert-match            Invert match: select non-matching lines
  -w, --word-regexp             Force PATTERN to match only whole words
  -Q, --literal                 Quote all metacharacters; PATTERN is literal

Search output:
  --lines=NUM                   Only print line(s) NUM of each file
  -l, --files-with-matches      Only print filenames containing matches
  -L, --files-without-matches   Only print filenames with no matches
  --output=expr                 Output the evaluation of expr for each line
                                (turns off text highlighting)
  -o                            Show only the part of a line matching PATTERN
                                Same as --output='$&'
  --passthru                    Print all lines, whether matching or not
  --match PATTERN               Specify PATTERN explicitly.
  -m, --max-count=NUM           Stop searching in each file after NUM matches
  -1                            Stop searching after one match of any kind
  -H, --with-filename           Print the filename for each match (default:
                                on unless explicitly searching a single file)
  -h, --no-filename             Suppress the prefixing filename on output
  -c, --count                   Show number of lines matching per file
  --[no]column                  Show the column number of the first match

  -A NUM, --after-context=NUM   Print NUM lines of trailing context after
                                matching lines.
  -B NUM, --before-context=NUM  Print NUM lines of leading context before
                                matching lines.
  -C [NUM], --context[=NUM]     Print NUM lines (default 2) of output context.

  --print0                      Print null byte as separator between filenames,
                                only works with -f, -g, -l, -L or -c.

  -s                            Suppress error messages about nonexistent or
                                unreadable files.


File presentation:
  --pager=COMMAND               Pipes all ack output through COMMAND.  For
                                example, --pager="less -R".  Ignored if output
                                is redirected.
  --nopager                     Do not send output through a pager.  Cancels
                                any setting in ~/.ackrc, ACK_PAGER or
                                ACK_PAGER_COLOR.
  --[no]heading                 Print a filename heading above each file's
                                results.  (default: on when used interactively)
  --[no]break                   Print a break between results from different
                                files.  (default: on when used interactively)
  --group                       Same as --heading --break
  --nogroup                     Same as --noheading --nobreak
  --[no]color                   Highlight the matching text (default: on unless
                                output is redirected, or on Windows)
  --[no]colour                  Same as --[no]color
  --color-filename=COLOR
  --color-match=COLOR
  --color-lineno=COLOR          Set the color for filenames, matches, and line
                                numbers.
  --flush                       Flush output immediately, even when ack is used
                                non-interactively (when output goes to a pipe or
                                file).


File finding:
  -f                            Only print the files selected, without
                                searching.  The PATTERN must not be specified.
  -g                            Same as -f, but only select files matching
                                PATTERN.
  --sort-files                  Sort the found files lexically.
  --show-types                  Show which types each file has.
  --files-from=FILE             Read the list of files to search from FILE.
  -x                            Read the list of files to search from STDIN.

File inclusion/exclusion:
  --[no]ignore-dir=name         Add/remove directory from list of ignored dirs
  --[no]ignore-directory=name   Synonym for ignore-dir
  --ignore-file=filter          Add filter for ignoring files
  -r, -R, --recurse             Recurse into subdirectories (default: on)
  -n, --no-recurse              No descending into subdirectories
  --[no]follow                  Follow symlinks.  Default is off.
  -k, --known-types             Include only files of types that ack recognizes.

  --type=X                      Include only X files, where X is a recognized
                                filetype.
  --type=noX                    Exclude X files.
                                See "ack --help-types" for supported filetypes.

File type specification:
  --type-set TYPE:FILTER:FILTERARGS
                                Files with the given FILTERARGS applied to the
                                given FILTER are recognized as being of type
                                TYPE. This replaces an existing definition for
                                type TYPE.
  --type-add TYPE:FILTER:FILTERARGS
                                Files with the given FILTERARGS applied to the
                                given FILTER are recognized as being type TYPE.
  --type-del TYPE               Removes all filters associated with TYPE.


Miscellaneous:
  --[no]env                     Ignore environment variables and global ackrc
                                files.  --env is legal but redundant.
  --ackrc=filename              Specify an ackrc file to use
  --ignore-ack-defaults         Ignore default definitions included with ack.
  --create-ackrc                Outputs a default ackrc for your customization
                                to standard output.
  --help, -?                    This help
  --help-types                  Display all known types
  --dump                        Dump information on which options are loaded
                                from which RC files
  --[no]filter                  Force ack to treat standard input as a pipe
                                (--filter) or tty (--nofilter)
  --man                         Man page
  --version                     Display version & copyright
  --thpppt                      Bill the Cat
  --bar                         The warning admiral
  --cathy                       Chocolate! Chocolate! Chocolate!

Exit status is 0 if match, 1 if no match.

ack's home page is at http://beyondgrep.com/

The full ack manual is available by running "ack --man".

This is version 2.14 of ack.  Run "ack --version" for full version info.


atop

atop is a replacement for top.

atop usage
[xtrnaw7@t540p bin]$ ./atop -h
Usage: atop [-flags] [interval [samples]]
        or
Usage: atop -w  file  [-S] [-a] [interval [samples]]
       atop -r [file] [-b hh:mm] [-e hh:mm] [-flags]

    generic flags:
      -a  show or log all processes (i.s.o. active processes only)
      -R  calculate proportional set size (PSS) per process
      -P  generate parseable output for specified label(s)
      -L  alternate line length (default 80) in case of non-screen output
      -f  show fixed number of lines with system statistics
      -F  suppress sorting of system resources
      -G  suppress exited processes in output
      -l  show limited number of lines for certain resources
      -y  show individual threads
      -1  show average-per-second i.s.o. total values

      -x  no colors in case of high occupation
      -g  show general process-info (default)
      -m  show memory-related process-info
      -d  show disk-related process-info
      -n  show network-related process-info
      -s  show scheduling-related process-info
      -v  show various process-info (ppid, user/group, date/time)
      -c  show command line per process
      -o  show own defined process-info
      -u  show cumulated process-info per user
      -p  show cumulated process-info per program (i.e. same name)

      -C  sort processes in order of cpu-consumption (default)
      -M  sort processes in order of memory-consumption
      -D  sort processes in order of disk-activity
      -N  sort processes in order of network-activity
      -A  sort processes in order of most active resource (auto mode)

    specific flags for raw logfiles:
      -w  write raw data to   file (compressed)
      -r  read  raw data from file (compressed)
          special file: y[y...] for yesterday (repeated)
      -S  finish atop automatically before midnight (i.s.o. #samples)
      -b  begin showing data from specified time
      -e  finish showing data after specified time

    interval: number of seconds   (minimum 0)
    samples:  number of intervals (minimum 1)

If the interval-value is zero, a new sample can be
forced manually by sending signal USR1 (kill -USR1 pid_atop)
or with the keystroke 't' in interactive mode.

Please refer to the man-page of 'atop' for more details.








bmon

"bmon is a monitoring and debugging tool to capture networking related statistics and prepare them visually in a human friendly way. It features various output methods including an interactive curses user interface and a programmable text output for scripting."

bmon usage
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/bin]$ ./bmon -h
bmon 3.9
Copyright (C) 2001-2015 by Thomas Graf <tgraf@suug.ch>
Copyright (C) 2013 Red Hat, Inc.
bmon comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the source
code for details.

Usage: bmon [OPTION]...

Options:
Startup:
   -i, --input=MODPARM             Input module(s)
   -o, --output=MODPARM            Output module(s)
   -f, --configfile=PATH           Alternative path to configuration file
   -h, --help                      Show this help text
   -V, --version                   Show version

Input:
   -p, --policy=POLICY             Element display policy (see below)
   -a, --show-all                  Show all elements (even disabled elements)
   -r, --read-interval=FLOAT       Read interval in seconds (float)
   -R, --rate-interval=FLOAT       Rate interval in seconds (float)
   -s, --sleep-interval=FLOAT      Sleep time in seconds (float)
   -L, --lifetime=LIFETIME         Lifetime of an element in seconds (float)

Output:
   -U, --use-si                    Use SI units
   -b, --use-bit                   Display in bits instead of bytes

Module configuration:
   modparm := MODULE:optlist,MODULE:optlist,...
   optlist := option;option;...
   option  := TYPE[=VALUE]

   Examples:
       -o curses:ngraph=2
       -o list            # Shows a list of available modules
       -o curses:help     # Shows a help text for html module

Interface selection:
   policy  := [!]simple_regexp,[!]simple_regexp,...

   Example: -p 'eth*,lo*,!eth1'

Please see the bmon(1) man pages for full documentation.
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/bin]$


Example screen shot





bonnie++

"Bonnie++ is a benchmark suite that is aimed at performing a number of simple tests of hard drive and file system performance. Then you can decide which test is important and decide how to compare different systems after running it. I have no plans to ever have it produce a single number, because I don't think that a single number can be useful when comparing such things.
The main program tests database type access to a single file (or a set of files if you wish to test more than 1G of storage), and it tests creation, reading, and deleting of small files which can simulate the usage of programs such as Squid, INN, or Maildir format email.
The ZCAV program which I initially released as a seperate package tests the performance of different zones of a hard drive. It does not write any data (so you can use it on full file systems). It can show why comparing the speed of Windows at the start of a hard drive to Linux at the end of the hard drive (typical dual-boot scenario) isn't a valid comparison.
Bonnie++ was based on the code for Bonnie by Tim Bray. "

bonnie++ usage
[JWM session] [xtrnaw7@t540p /var/tmp/jwm]$ bonnie++ -h
bonnie++: invalid option -- 'h'
usage: bonnie++ [-d scratch-dir] [-s size(MiB)[:chunk-size(b)]]
                [-n number-to-stat[:max-size[:min-size][:num-directories]]]
                [-m machine-name]
                [-r ram-size-in-MiB]
                [-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
                [-q] [-f] [-b] [-D] [-p processes | -y]

Version: 1.03e




busybox

"BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.

BusyBox has been written with size-optimization and limited resources in mind. It is also extremely modular so you can easily include or exclude commands (or features) at compile time. This makes it easy to customize your embedded systems. To create a working system, just add some device nodes in /dev, a few configuration files in /etc, and a Linux kernel."

busybox is compiled for all supported tools; the binary and links are in the directory ${JWM_DIR}/busybox.

Binaries combined in busybox

[xtrnaw7@t540p /var/tmp/jwm/busybox]$ ls
[           cttyhack       fsck        iprule       mkfs.vfat      raidautorun   sleep              ubirmvol
[[          cut            fsck.minix  iptunnel     mknod          rdate         smemcap            ubirsvol
acpid       date           fstrim      kbd_mode     mkpasswd       rdev          softlimit          ubiupdatevol
addgroup    dc             fsync       kill         mkswap         readahead     sort               udhcpc
add-shell   dd             ftpd        killall      mktemp         readlink      split              udhcpd
adduser     deallocvt      ftpget      killall5     modinfo        readprofile   start-stop-daemon  udpsvd
adjtimex    delgroup       ftpput      klogd        modprobe       realpath      stat               uevent
ar          deluser        fuser       last         more           reboot        strings            umount
arp         depmod         getopt      less         mount          reformime     stty               uname
arping      devmem         getty       linux32      mountpoint     remove-shell  su                 uncompress
ash         df             grep        linux64      mpstat         renice        sulogin            unexpand
awk         dhcprelay      groups      linuxrc      mt             reset         sum                uniq
base64      diff           gunzip      ln           mv             resize        sv                 unix2dos
basename    dirname        gzip        loadfont     nameif         rev           svlogd             unlink
beep        dmesg          halt        loadkmap     nanddump       rm            swapoff            unlzma
blkdiscard  dnsd           hd          logger       nandwrite      rmdir         swapon             unlzop
blkid       dnsdomainname  hdparm      login        nbd-client     rmmod         switch_root        unshare
blockdev    dos2unix       head        logname      nc             route         sync               unxz
bootchartd  du             hexdump     logread      netstat        rpm           sysctl             unzip
brctl       dumpkmap       hostid      losetup      nice           rpm2cpio      syslogd            uptime
bunzip2     dumpleases     hostname    lpd          nmeter         rtcwake       tac                users
busybox     echo           httpd       lpq          nohup          runlevel      tail               usleep
bzcat       ed             hush        lpr          nsenter        run-parts     tar                uudecode
bzip2       egrep          hwclock     ls           nslookup       runsv         tcpsvd             uuencode
cal         eject          i2cdetect   lsattr       ntpd           runsvdir      tee                vconfig
cat         env            i2cdump     lsmod        od             rx            telnet             vi
catv        envdir         i2cget      lsof         openvt         script        telnetd            vlock
chat        envuidgid      i2cset      lspci        passwd         scriptreplay  test               volname
chattr      ether-wake     id          lsusb        patch          sed           tftp               wall
chgrp       expand         ifconfig    lzcat        pgrep          sendmail      tftpd              watch
chmod       expr           ifdown      lzma         pidof          seq           time               watchdog
chown       fakeidentd     ifenslave   lzop         ping           setarch       timeout            wc
chpasswd    false          ifplugd     lzopcat      ping6          setconsole    top                wget
chpst       fatattr        ifup        makedevs     pipe_progress  setfont       touch              which
chroot      fbset          inetd       makemime     pivot_root     setkeycodes   tr                 who
chrt        fbsplash       init        man          pkill          setlogcons    traceroute         whoami
chvt        fdflush        insmod      md5sum       pmap           setserial     traceroute6        whois
cksum       fdformat       install     mdev         popmaildir     setsid        true               xargs
clear       fdisk          ionice      mesg         poweroff       setuidgid     truncate           xz
cmp         fgconsole      iostat      microcom     powertop       sh            tty                xzcat
comm        fgrep          ip          mkdir        printenv       sha1sum       ttysize            yes
conspy      find           ipaddr      mkdosfs      printf         sha256sum     tunctl             zcat
cp          findfs         ipcalc      mke2fs       ps             sha3sum       tune2fs            zcip
cpio        flock          ipcrm       mkfifo       pscan          sha512sum     ubiattach
crond       fold           ipcs        mkfs.ext2    pstree         showkey       ubidetach
crontab     free           iplink      mkfs.minix   pwd            shuf          ubimkvol
cryptpw     freeramdisk    iproute     mkfs.reiser  pwdx           slattach      ubirename
[xtrnaw7@t540p /var/tmp/jwm/busybox]$




busybox_httpd.sh

busybox_httpd.sh is a script to start or stop the busybox httpd daemon.


The current version of the script is always available here.

The usage for the script is:


[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./busybox_httpd.sh --help
[25.10.2016 18:52 ] ### busybox_httpd.sh started at Tue Oct 25 18:52:07 CEST 2016
 busybox_httpd.sh

 Function: start or stop the busybox httpd daemon
 
 Usage:    busybox_httpd.sh [-v|--verbose] [-q|--quiet] [-f|--force] [-p|--port httpd_port] [-h|--home homedir] [-c|--config configfile]
                            [start [httpd_options]|stop|restart [httpd_options]|status|daemon_help]

 Parameter
   -v - verbose mode
   -q - quiet mode
   -f - force execution
   -p - port for httpd (default: 8080)
   -h - home dir , default: ${JWM_DIR}/htdocs or <script_dir>/../htdocs if JWM_DIR is not set
   -c - config file, default: ${JWM_DIR}/etc or <script_dir>/../etc/httpd.conf if JWM_DIR is not set
   -C - config file like -c but do NOT change the config file at all

   httpd_options - additional options for starting the httpd
   daemon_help - list the usage help for the busybox httpd daemon

  The script searches the busybox binary in these directories:
    - the current working directory
    - the directory with this script
    - the directory ${JWM_DIR}/busybox
    - the directory ${PWD}/../busybox

 Author:
   Bernd Schemmer (Bernd.Schemmer@gmx.de)

[25.10.2016 18:52 ] ### busybox_httpd.sh ended at Tue Oct 25 18:52:07 CEST 2016


Usage help for busybox_httpd.sh
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./busybox_httpd.sh start
[25.10.2016 18:52 ] ### busybox_httpd.sh started at Tue Oct 25 18:52:14 CEST 2016
[25.10.2016 18:52 ] Using the busybox directory based on the the environment variable JWM_DIR ("/var/tmp/jwm")
[25.10.2016 18:52 ] The busybox base directory is /var/tmp/jwm
[25.10.2016 18:52 ] Starting the httpd daemon ...
[25.10.2016 18:52 ] Using the httpd home directory /var/tmp/jwm/htdocs
[25.10.2016 18:52 ] Using the httpd config file /var/tmp/jwm/etc/httpd.conf
[25.10.2016 18:52 ] The port to use for the httpd daemon is 8080
[25.10.2016 18:52 ] Preparing the environment to start the busybox httpd with php support ...
[25.10.2016 18:52 ] Searching for the php-cgi binary ...
[25.10.2016 18:52 ] Using the PHP binary "/usr/bin/php-cgi" ...
+ ./busybox/httpd '' -p 8080 -c /tmp/httpd.8080.conf -h /var/tmp/jwm/htdocs
+ 2>& 1

[25.10.2016 18:52 ] httpd daemon started; the PID is 573
[25.10.2016 18:52 ] Use http://localhost:8080 or http://t540p:8080 to access the httpd in your Webbrowser
[25.10.2016 18:52 ] ### busybox_httpd.sh ended at Tue Oct 25 18:52:14 CEST 2016

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./busybox_httpd.sh status
[25.10.2016 18:52 ] ### busybox_httpd.sh started at Tue Oct 25 18:52:25 CEST 2016
[25.10.2016 18:52 ] Using the busybox directory based on the the environment variable JWM_DIR ("/var/tmp/jwm")
[25.10.2016 18:52 ] The busybox base directory is /var/tmp/jwm
[25.10.2016 18:52 ] The httpd daemon is running; the PID is 573

UID        PID  PPID  C STIME TTY          TIME CMD
xtrnaw7    573     1  0 18:52 ?        00:00:00 ./busybox/httpd  -p 8080 -c /tmp/httpd.8080.conf -h /var/tmp/jwm/htdocs

[25.10.2016 18:52 ] The httpd daemon is listening on these ports:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::8080                 :::*                    LISTEN      573/./busybox/httpd

[25.10.2016 18:52 ] ### busybox_httpd.sh ended at Tue Oct 25 18:52:26 CEST 2016

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./busybox_httpd.sh stop
[25.10.2016 18:52 ] ### busybox_httpd.sh started at Tue Oct 25 18:52:29 CEST 2016
[25.10.2016 18:52 ] Using the busybox directory based on the the environment variable JWM_DIR ("/var/tmp/jwm")
[25.10.2016 18:52 ] The busybox base directory is /var/tmp/jwm
[25.10.2016 18:52 ] The httpd daemon is running; the PID is 573
[25.10.2016 18:52 ] Stopping the httpd daemon ...
[25.10.2016 18:52 ] ### busybox_httpd.sh ended at Tue Oct 25 18:52:30 CEST 2016

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./busybox_httpd.sh status
[25.10.2016 18:52 ] ### busybox_httpd.sh started at Tue Oct 25 18:52:33 CEST 2016
[25.10.2016 18:52 ] Using the busybox directory based on the the environment variable JWM_DIR ("/var/tmp/jwm")
[25.10.2016 18:52 ] The busybox base directory is /var/tmp/jwm
[25.10.2016 18:52 ] The httpd daemon is NOT running (well, it may be running but it was not started by this script)
[25.10.2016 18:52 ] ### busybox_httpd.sh ended at Tue Oct 25 18:52:33 CEST 2016
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$


To change the port used by the httpd use:

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./busybox_httpd.sh -p 8888 start
[25.10.2016 18:53 ] ### busybox_httpd.sh started at Tue Oct 25 18:53:13 CEST 2016
[25.10.2016 18:53 ] Using the busybox directory based on the the environment variable JWM_DIR ("/var/tmp/jwm")
[25.10.2016 18:53 ] The busybox base directory is /var/tmp/jwm
[25.10.2016 18:53 ] Starting the httpd daemon ...
[25.10.2016 18:53 ] Using the httpd home directory /var/tmp/jwm/htdocs
[25.10.2016 18:53 ] Using the httpd config file /var/tmp/jwm/etc/httpd.conf
[25.10.2016 18:53 ] The port to use for the httpd daemon is 8888
[25.10.2016 18:53 ] Preparing the environment to start the busybox httpd with php support ...
[25.10.2016 18:53 ] Searching for the php-cgi binary ...
[25.10.2016 18:53 ] Using the PHP binary "/usr/bin/php-cgi" ...
+ ./busybox/httpd '' -p 8888 -c /tmp/httpd.8888.conf -h /var/tmp/jwm/htdocs
+ 2>& 1

[25.10.2016 18:53 ] httpd daemon started; the PID is 825
[25.10.2016 18:53 ] Use http://localhost:8888 or http://t540p:8888 to access the httpd in your Webbrowser
[25.10.2016 18:53 ] ### busybox_httpd.sh ended at Tue Oct 25 18:53:13 CEST 2016

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./busybox_httpd.sh status
[25.10.2016 18:53 ] ### busybox_httpd.sh started at Tue Oct 25 18:53:19 CEST 2016
[25.10.2016 18:53 ] Using the busybox directory based on the the environment variable JWM_DIR ("/var/tmp/jwm")
[25.10.2016 18:53 ] The busybox base directory is /var/tmp/jwm
[25.10.2016 18:53 ] The httpd daemon is running; the PID is 825

UID        PID  PPID  C STIME TTY          TIME CMD
xtrnaw7    825     1  0 18:53 ?        00:00:00 ./busybox/httpd  -p 8888 -c /tmp/httpd.8888.conf -h /var/tmp/jwm/htdocs

[25.10.2016 18:53 ] The httpd daemon is listening on these ports:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::8888                 :::*                    LISTEN      825/./busybox/httpd

[25.10.2016 18:53 ] ### busybox_httpd.sh ended at Tue Oct 25 18:53:19 CEST 2016

[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$ ./busybox_httpd.sh stop
[25.10.2016 18:53 ] ### busybox_httpd.sh started at Tue Oct 25 18:53:30 CEST 2016
[25.10.2016 18:53 ] Using the busybox directory based on the the environment variable JWM_DIR ("/var/tmp/jwm")
[25.10.2016 18:53 ] The busybox base directory is /var/tmp/jwm
[25.10.2016 18:53 ] The httpd daemon is running; the PID is 825
[25.10.2016 18:53 ] Stopping the httpd daemon ...
[25.10.2016 18:53 ] ### busybox_httpd.sh ended at Tue Oct 25 18:53:31 CEST 2016
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$



The known parameter of the busybox httpd daemon are:

[25.10.2016 19:04 ] Additional parameter supported by the busybox httpd daemon are:
BusyBox v1.25.0 (2016-10-25 14:12:10 CEST) multi-call binary.

Usage: httpd [-ifv[v]] [-c CONFFILE] [-p [IP:]PORT] [-u USER[:GRP]] [-r REALM] [-h HOME]
or httpd -d/-e/-m STRING

Listen for incoming HTTP requests

    -i              Inetd mode
    -f              Don't daemonize
    -v[v]           Verbose
    -p [IP:]PORT    Bind to IP:PORT (default *:80)
    -u USER[:GRP]   Set uid/gid after binding to port
    -r REALM        Authentication Realm for Basic Authentication
    -h HOME         Home directory (default .)
    -c FILE         Configuration file (default {/etc,HOME}/httpd.conf)
    -m STRING       MD5 crypt STRING
    -e STRING       HTML encode STRING
    -d STRING       URL decode STRING

[25.10.2016 19:04 ] ### busybox_httpd.sh ended at Tue Oct 25 19:04:44 CEST 2016
[JWM session] [xtrnaw7@t540p /var/tmp/jwm/scripts]$



bvi


"The bvi is a display-oriented editor for binary files (hex editor), based on the vi texteditor. If you are familiar with vi, just start the editor and begin to edit! A bmore program is also included in the package.
If you never heard about vi, maybe bvi is not the best choice for you. "

bvi usage
[JWM session] [xtrnaw7@t540p /var/tmp/jwm]$ bvi -h Usage: bvi [-R] [-c cmd | +cmd] [-f script] [-s begin] [-e end] [-n size] file ... file offset/size: 10k, 20m, 1g, 0x1000 hex, 0200 octal [JWM session] [xtrnaw7@t540p /var/tmp/jwm]$


Example screen shot: