All Projects → google → usbmon

google / usbmon

Licence: Apache-2.0 License
List and monitor USB devices connected to Linux host. Also as Collectd plugin.

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to usbmon

pyrfidhid
Python library to control Chinese USB HID 125Khz RFID Reader/Writer
Stars: ✭ 104 (+271.43%)
Mutual labels:  usb
getting-started
List of ideas for getting started with TimVideos projects
Stars: ✭ 50 (+78.57%)
Mutual labels:  usb
ntpmon
Monitor for essential NTP metrics
Stars: ✭ 27 (-3.57%)
Mutual labels:  collectd-plugin
android-usb-script
An Android app that allows you to script USB gadgets (work-in-progress).
Stars: ✭ 15 (-46.43%)
Mutual labels:  usb
STM32 XPD
STM32 eXtensible Peripheral Drivers
Stars: ✭ 38 (+35.71%)
Mutual labels:  usb
SerialProxy
🖱️⌨️ Arduino Input Proxying for PC (.NET Core)
Stars: ✭ 39 (+39.29%)
Mutual labels:  usb
e-verest
EVEREST: e-Versatile Research Stick for peoples
Stars: ✭ 21 (-25%)
Mutual labels:  usb
azalea
main board for the GreatFET project, also known as GreatFET One
Stars: ✭ 52 (+85.71%)
Mutual labels:  usb
phywhispererusb
PhyWhisperer-USB: Hardware USB Trigger
Stars: ✭ 56 (+100%)
Mutual labels:  usb
usb
Minimalist portable USB device stack for SAMD21, LPC1800, LPC4300, Xmega
Stars: ✭ 90 (+221.43%)
Mutual labels:  usb
PUBG USB
这是 某宝 卖大几千的压枪源码,不做任何数据读取以及侵入,这里采用外数据采集(IMG), 至今可以使用,无视任何更新(新武器,以及新武器的压枪规则,需要自己调试,在data_config下);
Stars: ✭ 44 (+57.14%)
Mutual labels:  usb
usb stack
Tiny and portable USB device/host stack for embedded system with USB IP
Stars: ✭ 175 (+525%)
Mutual labels:  usb
tesla-usb-drive
Tesla DashCam & Music USB drive maker tool
Stars: ✭ 17 (-39.29%)
Mutual labels:  usb
hmg
💝 My personal Gentoo/Linux configuration backup files
Stars: ✭ 16 (-42.86%)
Mutual labels:  udev
batify
Only one udevrule file triggering plug and critical battery level notifications (multi-x sessions support)
Stars: ✭ 47 (+67.86%)
Mutual labels:  udev
usbcorev
A full-speed device-side USB peripheral core written in Verilog.
Stars: ✭ 135 (+382.14%)
Mutual labels:  usb
akbl
Control the lights of Alienware computers under GNU/Linux systems.
Stars: ✭ 99 (+253.57%)
Mutual labels:  usb
MiniNT5-Tools
small Windows 10 (based on Windows PE) with customised tools
Stars: ✭ 34 (+21.43%)
Mutual labels:  usb
FPGA-USB-Device
FPGA-based USB-device controller to implement USB-CDC, USB-HID, etc.
Stars: ✭ 29 (+3.57%)
Mutual labels:  usb
ws-ldn-12
ARM / STM32F7 DIY synth workshop
Stars: ✭ 62 (+121.43%)
Mutual labels:  usb

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
  • JSON stream mode

Requirements

requires libudev-dev

Usage

Flags

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

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.

JSON Stream mode

Usbmon can generate a streaming JSON output with per port events. Streaming JSON is basically a never ending array. To use in Go:

type evt struct {
  Port   string
  Serial string
  Event  string
  Speed  float32
}
u := exec.Command("usbmon")
o, _ := u.StdoutPipe()
u.Start()
d := json.NewDecoder(o)
d.Token() // read opening [
for d.More() {
  var e evt
  d.Decode(&e)
  fmt.Printf("%+v\n", e)
}

License

  • Usbmon code is licensed under Apache 2.0
  • Usbmon links with libudev which is GPL2.1

Disclaimer

This is not an official Google product.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].