Add a port of tuptime, historical and statistical system running time report
tool like uptime(1) command but with more interesting output. PR: 203079 Submitted by: Jeremy Johnston
This commit is contained in:
parent
2c0d50dd9a
commit
94c76f99d2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400493
@ -1027,6 +1027,7 @@
|
||||
SUBDIR += tss
|
||||
SUBDIR += tty-clock
|
||||
SUBDIR += ttyload
|
||||
SUBDIR += tuptime
|
||||
SUBDIR += tw_cli
|
||||
SUBDIR += tzdialog
|
||||
SUBDIR += u-boot-bananapi
|
||||
|
32
sysutils/tuptime/Makefile
Normal file
32
sysutils/tuptime/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
# Created by: Jeremy Johnston <jeremy@smart-serv.net>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= tuptime
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 3.2.01
|
||||
CATEGORIES= sysutils
|
||||
|
||||
MAINTAINER= jeremy@smart-serv.net
|
||||
COMMENT= Historical and statistical system running time report tool
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>=2.7:${PORTSDIR}/databases/py-sqlite3
|
||||
|
||||
USES= python shebangfix
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= rfrail3
|
||||
|
||||
NO_BUILD= yes
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
SHEBANG_FILES= latest/tuptime
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
PLIST_FILES= bin/tuptime
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/latest/tuptime ${STAGEDIR}${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
2
sysutils/tuptime/distinfo
Normal file
2
sysutils/tuptime/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (rfrail3-tuptime-v3.2.01_GH0.tar.gz) = 330fbb7f9163fd1ec1c139a3e7652f86ddd2987f3e94e3b481f1a3f3e3da64c2
|
||||
SIZE (rfrail3-tuptime-v3.2.01_GH0.tar.gz) = 51114
|
18
sysutils/tuptime/files/pkg-message.in
Normal file
18
sysutils/tuptime/files/pkg-message.in
Normal file
@ -0,0 +1,18 @@
|
||||
======================================================================
|
||||
|
||||
tuptime requires linprocfs(5) mounted under /compat/linux/proc.
|
||||
|
||||
If you have not done it yet, please do the following:
|
||||
|
||||
mkdir -p /usr/compat/linux/proc; ln -sf usr/compat /compat
|
||||
mount -t linprocfs linprocfs /compat/linux/proc
|
||||
|
||||
To make it permanent, you need the following lines in /etc/fstab:
|
||||
|
||||
linproc /compat/linux/proc linprocfs rw,late 0 0
|
||||
|
||||
tuptime also requires the following be added to /etc/crontab:
|
||||
|
||||
*/5 * * * * root test -x %%PREFIX%%/bin/tuptime && %%PREFIX%%/bin/tuptime -x > /dev/null
|
||||
|
||||
======================================================================
|
33
sysutils/tuptime/files/tuptime.in
Normal file
33
sysutils/tuptime/files/tuptime.in
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: tuptime
|
||||
# KEYWORD: nojail shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="tuptime"
|
||||
rcvar=tuptime_enable
|
||||
|
||||
command="%%PREFIX%%/bin/tuptime"
|
||||
|
||||
start_cmd="${name}_start"
|
||||
stop_cmd="${name}_stop"
|
||||
|
||||
tuptime_start()
|
||||
{
|
||||
command_args="-x"
|
||||
|
||||
$command $command_args
|
||||
}
|
||||
|
||||
tuptime_stop()
|
||||
{
|
||||
command_args="-xg"
|
||||
|
||||
$command $command_args
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
5
sysutils/tuptime/pkg-descr
Normal file
5
sysutils/tuptime/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
Tuptime is a tool that reports historical and statistical running time of
|
||||
the system, keeping it between restarts. Like uptime(1) command but with
|
||||
more interesting output.
|
||||
|
||||
WWW: https://github.com/rfrail3/tuptime
|
Loading…
Reference in New Issue
Block a user