utmp

utmp parser for node.js

Usage no npm install needed!

<script type="module">
  import utmp from 'https://cdn.skypack.dev/utmp';
</script>

README

utmp

utmp parser for node.js

Installation

$ npm install utmp 

Usage

Example

var UtmpParser = require('utmp');

var p = new UtmpParser('/var/log/wtmp');
p.on('data', function(d) {
    console.log("got record:", d);
    })

p.run();

TODO

  • use ffi to read utmp definitions from libc.. don't hardcode them
  • osx/bsd support - linux only for now