2017 © Pedro Peláez
 

library uptime-parser

A PHP package for parsing uptime command output

image

vitorbari/uptime-parser

A PHP package for parsing uptime command output

  • Saturday, December 30, 2017
  • by vitorbari
  • Repository
  • 1 Watchers
  • 0 Stars
  • 162 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 2 % Grown

The README.md

uptime-parser

Build Status StyleCI Coverage Status, (*1)

A PHP package for parsing uptime command output, (*2)

Installation

Via Composer., (*3)

composer require vitorbari/uptime-parser

Usage

use VitorBari\UptimeParser\Parser;

$uptime_output = 'SNMP OK - Timeticks: (197181577) 22 days, 19:43:35.77';

$uptime = Parser::uptime($uptime_output);

echo $uptime->days; // 22
echo $uptime->hours; // 547
echo $uptime->minutes; // 32863
echo $uptime->seconds; // 1971815
echo $uptime->toTimeString(); // '22 day(s), 19 hour(s), 43 minute(s) and 35 second(s)'
echo $uptime; // '22 day(s), 19 hour(s), 43 minute(s) and 35 second(s)'

Supported Formats

SNMP OK - Timeticks: (197181577) 22 days, 19:43:35.77
SNMP OK - Timeticks, (12490039) 1 day, 10,41,40.39
SNMP OK - Timeticks, (6261427) 17,23,34.27
System Uptime - 44 day(s) 23 hour(s) 14 minute(s)
System Uptime - up 57 days, 12 Hours, 41 Minutes
System Uptime - 10 minute(s)
Sistema ativo a 32 Dia(s), 10 Hora(s) e 38 Minutos(s)

Different formats can be easily added., (*4)

The Versions

30/12 2017

dev-master

9999999-dev

A PHP package for parsing uptime command output

  Sources   Download

MIT

The Development Requires

by Vitor Bari Buccianti

parser php uptime

15/10 2017

1.0.3

1.0.3.0

A PHP package for parsing uptime command output

  Sources   Download

MIT

The Development Requires

by Vitor Bari Buccianti

parser php uptime

08/08 2017

1.0.2

1.0.2.0

A PHP package for parsing uptime command output

  Sources   Download

MIT

The Development Requires

by Vitor Bari Buccianti

parser php uptime

08/12 2016

dev-analysis-qxBolM

dev-analysis-qxBolM

A PHP package for parsing uptime command output

  Sources   Download

MIT

The Development Requires

by Vitor Bari Buccianti

parser php uptime

04/08 2016

1.0.1

1.0.1.0

A PHP package for parsing uptime command output

  Sources   Download

MIT

The Development Requires

by Vitor Bari Buccianti

parser php uptime

02/08 2016

1.0.0

1.0.0.0

A PHP package for parsing uptime command output

  Sources   Download

MIT

The Development Requires

by Vitor Bari Buccianti

parser php uptime