Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    node-procpublic

    Node-Proc

    Module to access /proc data on Linux system

    Installation

    npm install node-proc
    

    ToDo

    • Expand Functions
    • Platform Independant Data Format
    • Cross-Platform Data Gathering

    Usage

    Memory Info

    System Memory Usage in Bytes

    proc.meminfo( callback )
    
    callback( err, array meminfo )
    

    Example

    { MemTotal: 383238144,
      MemFree: 38522880,
      Buffers: 8245248,
      Cached: 258404352,
      ...
    }
    

    CPU Info

    System Processor(s) Information

    proc.cpuinfo( callback )
    
    callback( err, array cpuinfo )
    

    Example

    [ { processor: '0',
        vendor_id: 'GenuineIntel',
        model: '58',
        'model name': 'Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz',
        ...
      },
      ...
    ]
    

    System Uptime

    System Uptime

    proc.uptime( callback )
    
    callback( err, integer uptime, integer startTime )
    

    Note: uptime is the seconds since system boot, and startTime is the unix timestamp of system boot.

    Network Devices Transfer

    Bytes and packets transferred by system network devices

    proc.netdev( callback )
    
    callback( err, array netdev )
    

    Example

    [ { device: 'lo',
        Rx: { bytes: '0', packets: '0' },
        Tx: { bytes: '0', packets: '0' } },
      { device: 'eth0',
        Rx: { bytes: '31931251', packets: '36785' },
        Tx: { bytes: '1438069', packets: '19862' } } ]
    

    install

    npm i node-proc

    Downloadsweekly downloads

    50

    version

    0.0.1

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar