Skip to content
forked from google/usbmon

List and monitor USB devices connected to Linux host. Also as Collectd plugin.

License

Notifications You must be signed in to change notification settings

grecky-goo/usbmon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USBMON

A tool to enumerate, list and monitor USB devices connected to a Linux host.

  • Print a list of connected devices with USB path, properties and speed
  • Monitor udev events such as connect or disconnect and print them with a timestamp
  • Collectd plugin mode

Requirements

requires libudev-dev

Usage

Flags

usbmon [-n][-c]
  -n do not monitor events
  -c collectd exec plugin mode

Experimental collectd plugin mode

Usbmon can operate as collectd exec plugin.

Add a new type to /usr/share/collectd/types.db:

usb_devices             connected:GAUGE:0:U, adds:COUNTER:U:U, removes:COUNTER:U:U

Create exec plugin config file, /etc/collectd/collectd.conf.d/usbmon.conf:

LoadPlugin Exec
<Plugin exec>
  Exec "nobody" "/var/lib/collectd/plugins/usbmon" "-c"
</Plugin>

Install usbmon in the plugins directory and restart collectd.

License

Apache 2.0

Disclaimer

This is not an official Google product.

About

List and monitor USB devices connected to Linux host. Also as Collectd plugin.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 98.3%
  • Makefile 1.7%