Giter Site home page Giter Site logo

kevinsuo / nmon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from steven-yates/nmon

0.0 1.0 0.0 549 KB

This fork fixes some of the issues in the original makefile and provide scripts for sending data to ATSD

Home Page: http://nmon.sourceforge.net

License: GNU General Public License v3.0

Shell 13.26% C 84.57% Makefile 2.17%

nmon's Introduction

nmon for Linux

Build Status

Nmon is "... systems administrator, tuner, benchmark tool gives you a huge amount of important performance information in one go.".

This fork fixes some of the issues in the original makefile. The project also hosts binary releases for selected Linux distributions: Ubuntu/Debian, RedHat. The binaries can be downloaded from nmon release page

Chartlab Portal

Installation

Download binary release :

curl -OL https://github.com/axibase/nmon/releases/download/16d/nmon_x86_ubuntu
chmod +x nmon_x86_ubuntu

Build

Download the latest version using git clone command:

git clone git://github.com/axibase/nmon.git

Download a specific branch with -b flag:

git clone git://github.com/axibase/nmon.git -b 16d

Change to the nmon source directory and execute build.sh script to compile nmon.

cd nmon
./build.sh

Alternatively, launch 'make' utility to compile nmon from sources for your distribution:

make nmon_arm_raspian

If compilation was successful, an nmon file will be created in the current directory.

You can now launch nmon by typing ./nmon_{yourDistribution}.

Uninstall

Remove nmon binary file:

rm nmon_{yourDistribution}

Usage Examples

Note: Make sure that /opt/nmon/nmon binary exists and is executable.

Launch nmon Console

/opt/nmon/nmon

Collect nmon Files Locally

  • Add the following row to your cron schedule:
0 * * * * /opt/nmon/nmon -f /opt/nmon/ -s 60 -c 60 -T

Upload Hourly Files to ATSD with wget

  • Create a file /opt/nmon/nmon_script.sh and add the following row to your cron schedule:
0 * * * * /opt/nmon/nmon_script.sh
  • /opt/nmon/nmon_script.sh contents:

Note: Replace atsd_user, atsd_password, atsd_server with actual credentials:

#!/bin/sh
fn="/nmon/nmon/`date +%y%m%d_%H%M`.nmon";pd="`/opt/nmon/nmon -F $fn -s 60 -c 60 -T -p`"; \
while kill -0 $pd; do sleep 15; done; \
wget -t 1 -T 10 --user=atsd_user --password=atsd_password --no-check-certificate -O - --post-file="$fn" \
--header="Content-type: text/csv" "https://atsd_server/api/v1/nmon?f=`basename $fn`"

Upload Hourly Files to ATSD with UNIX Socket

Note: require bash

  • Create a file /opt/nmon/nmon_script.sh and add the following row to your cron schedule:
0 * * * * /opt/nmon/nmon_script.sh
  • /opt/nmon/nmon_script.sh contents:

Note: Replace atsd_server with ATSD hostname or IP address.

#!/bin/bash
fn="/opt/nmon/`date +%y%m%d_%H%M`.nmon";pd="`/opt/nmon/nmon -F $fn -s 60 -c 60 -T -p`"; \
while kill -0 $pd; do sleep 15; done; \
{ echo "nmon p:default e:`hostname` f:`hostname`_file.nmon"; cat $fn; } > /dev/tcp/atsd_server/8081

Upload Hourly Files to ATSD with netcat

  • Create a file /opt/nmon/nmon_script.sh and add the following row to your cron schedule:
0 * * * * /opt/nmon/nmon_script.sh
  • /opt/nmon/nmon_script.sh contents:

Note: Replace atsd_server with ATSD hostname or IP address.

#!/bin/sh
fn="/opt/nmon/`date +%y%m%d_%H%M`.nmon";pd="`/opt/nmon/nmon -F $fn -s 60 -c 60 -T -p`"; \
while kill -0 $pd; do sleep 15; done; \
{ echo "nmon p:default e:`hostname` f:`hostname`_file.nmon"; cat $fn; } | nc atsd_server 8081

nmon's People

Contributors

rodionos avatar

Watchers

Kevin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.