Code Monkey home page Code Monkey logo

deadman's Introduction

deadman

deadman is an observation software for host status using ping.

deadman does not have rich functionalities. It only checks host statuses using ICMP echo. We recomend using deadman for building temporary networks such as conference and event networks. This software was originally designed and implemented for Interop Tokyo ShowNet.

demo

How to use

Clone this repository and then run.

$ git clone https://github.com/upa/deadman
$ cd deadman
$ ./deadman deadman.conf

To change the targets, modify or create a config file.

$ cat deadman.conf
google          173.194.117.176
googleDNS       8.8.8.8
kame            203.178.141.194
kame6           2001:200:dff:fff1:216:3eff:feb1:44d7

deadman with -a or --async-mode option sends ping to targets asynchronously.

Each line in the config file indicates a target host. Ping options, specifying source addresses and using netns, etc, are noted on the deadman.conf. For example, ping via a remote host through ssh is implemented.

google-via-ssh  173.194.117.176 relay=X.X.X.X os=Linux

This line means sending ping to a google server via the remote server X.X.X.X. username and ssh-key for the remote host can be specified by user=USER, key=KEYPATH. Other ssh attributes follow user's environment executing deadman.

Moreover, -s option indicates the scale of RTT bar graph. default is 10ms.

You can send deadman a SIGHUP to have it reload its configuration file. When this happens, existing entries will not lose their history.

License

MIT

Contact

[email protected]

deadman's People

Contributors

cfra avatar drpnd avatar enukane avatar fenner avatar jclarke-csco avatar k-akashi avatar lwhsu avatar panakuma avatar sasukeh avatar slankdev avatar superchild avatar upa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deadman's Issues

python3

Move to python3.

I tried it during Interop Tokyo ShowNet 2018 on the python3-tmp branch, but it was not a suitable way. It may need cleanup and refactoring.

When used keyboard interruption with Ctrl-c, called traceback by python.

When used keyboard interruption with Ctrl-c, called traceback by python like following error.
I think daedoman needs exception handler.

upa-san
how do you think about this?
Is there some suggestion?

~/C/deadman ❯❯❯ ./deadman deadman.conf
Traceback (most recent call last):
File "./deadman", line 593, in
curses.wrapper (main)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "./deadman", line 558, in main
deadman.main ()
File "./deadman", line 478, in main
time.sleep (PING_ALLTARGET_INTERVAL)
KeyboardInterrupt

~/C/deadman ❯❯❯ ./deadman deadman.conf
Traceback (most recent call last):
File "./deadman", line 593, in
curses.wrapper (main)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "./deadman", line 558, in main
deadman.main ()
File "./deadman", line 471, in main
target.send ()
File "./deadman", line 85, in send
res = self.ping.send ()
File "./deadman", line 186, in send
result = commands.getoutput (pingcmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/commands.py", line 50, in getoutput
return getstatusoutput(cmd)[1]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/commands.py", line 60, in getstatusoutput
text = pipe.read()
KeyboardInterrupt

Use OS-independent ping

The current implementation uses ping commands on OSes. However, their options are different and sometimes changed (e.g., on ubuntu 18.04). So, we need to use OS-independent ping.

Which is a better way for achieving it?

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.