Add the entire "processes" menu. This will allow
starting/stopping/showing/restarting of things in /etc/rc.d. Also add a few quick top(1)-like utilties just to round the menu off.
This commit is contained in:
parent
8b33f6cba9
commit
221495cc86
@ -1,6 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.3 2001/04/25 04:05:04 garbled Exp $
|
||||
# $NetBSD: Makefile,v 1.4 2001/04/26 02:26:16 garbled Exp $
|
||||
|
||||
SUBDIR= info install system users util network
|
||||
SUBDIR= info install system users procs util network
|
||||
|
||||
FILES= help index
|
||||
FILESDIR=${BINDIR}/sushi
|
||||
|
@ -1,7 +1,8 @@
|
||||
# $NetBSD: index,v 1.4 2001/04/25 03:43:25 garbled Exp $
|
||||
# $NetBSD: index,v 1.5 2001/04/26 02:26:16 garbled Exp $
|
||||
install install Software Installation and Maintenance
|
||||
system system System Maintenance
|
||||
users users Security & Users
|
||||
users users Security and Users
|
||||
procs procs Processes and Daemons
|
||||
network network Network related configuration
|
||||
BLANK BLANK BLANK
|
||||
info info Using sushi (information only)
|
||||
|
12
share/sushi/procs/Makefile
Normal file
12
share/sushi/procs/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:17 garbled Exp $
|
||||
|
||||
SUBDIR= restartallprocs restartprocs showallprocs showprocs startallprocs
|
||||
SUBDIR+= startprocs stopallprocs stopprocs topcpu topmem toptime
|
||||
|
||||
FILES= help index
|
||||
FILESDIR=${BINDIR}/sushi/procs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.subdir.mk>
|
14
share/sushi/procs/help
Normal file
14
share/sushi/procs/help
Normal file
@ -0,0 +1,14 @@
|
||||
Using the various forms and functions in this menu, you can start and stop
|
||||
daemons on your machine. The configured daemons are those that you have
|
||||
set up to run at boot time in your /etc/rc.conf file.
|
||||
Starting/stopping/restarting an unconfigured daemon will not change it's
|
||||
configuration for the next reboot. If you wish for it to start
|
||||
automatically at your next boot, you should edit it from the
|
||||
system/rc.conf menu.
|
||||
|
||||
The top 15 process functions are a quick and dirty way for you to observe
|
||||
which processes on your machine are taking up the most resources. For a
|
||||
much better and more interactive way to do this, see the top(1) program
|
||||
and manpage.
|
||||
|
||||
$NetBSD: help,v 1.1 2001/04/26 02:26:17 garbled Exp $
|
13
share/sushi/procs/index
Normal file
13
share/sushi/procs/index
Normal file
@ -0,0 +1,13 @@
|
||||
# $NetBSD: index,v 1.1 2001/04/26 02:26:17 garbled Exp $
|
||||
showprocs showprocs Show configured and running daemons
|
||||
showallprocs showallprocs Show all daemons
|
||||
startprocs startprocs Start configured daemons
|
||||
startallprocs startallprocs Start any daemon
|
||||
stopprocs stopprocs Stop configured daemons
|
||||
stopallprocs stopallprocs Stop any daemon
|
||||
restartprocs restartprocs Restart configured daemons
|
||||
restartallprocs restartallprocs Restart any daemon
|
||||
BLANK BLANK BLANK
|
||||
topcpu topcpu Show top 15 processes by cpu usage
|
||||
topmem topmem Show top 15 processes by memory usage
|
||||
toptime toptime Show top 15 processes by cpu time
|
10
share/sushi/procs/restartallprocs/Makefile
Normal file
10
share/sushi/procs/restartallprocs/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:18 garbled Exp $
|
||||
|
||||
FILES= form help
|
||||
FILESDIR=${BINDIR}/sushi/procs/restartallprocs
|
||||
SCRIPTS= script script1
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/restartallprocs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
2
share/sushi/procs/restartallprocs/form
Normal file
2
share/sushi/procs/restartallprocs/form
Normal file
@ -0,0 +1,2 @@
|
||||
# $NetBSD: form,v 1.1 2001/04/26 02:26:18 garbled Exp $
|
||||
script:script1 Which daemon to restart?
|
1
share/sushi/procs/restartallprocs/help
Normal file
1
share/sushi/procs/restartallprocs/help
Normal file
@ -0,0 +1 @@
|
||||
Using this form you can pick the daemon you wish to restart, and restart it.
|
12
share/sushi/procs/restartallprocs/script
Executable file
12
share/sushi/procs/restartallprocs/script
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:18 garbled Exp $
|
||||
|
||||
if [ "$1" = "none" ]; then
|
||||
echo "None selected, no action taken"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/etc/rc.d/$1 forcerestart
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to restart $1"
|
||||
fi
|
9
share/sushi/procs/restartallprocs/script1
Executable file
9
share/sushi/procs/restartallprocs/script1
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/04/26 02:26:18 garbled Exp $
|
||||
|
||||
for i in `ls -1 /etc/rc.d`
|
||||
do
|
||||
/etc/rc.d/$i forcestatus
|
||||
done 2>&1 | grep -v unknown | grep -v Usage | grep 'is running' | \
|
||||
awk '{print $1}'
|
||||
echo "none"
|
10
share/sushi/procs/restartprocs/Makefile
Normal file
10
share/sushi/procs/restartprocs/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:18 garbled Exp $
|
||||
|
||||
FILES= form help
|
||||
FILESDIR=${BINDIR}/sushi/procs/restartprocs
|
||||
SCRIPTS= script script1
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/restartprocs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
2
share/sushi/procs/restartprocs/form
Normal file
2
share/sushi/procs/restartprocs/form
Normal file
@ -0,0 +1,2 @@
|
||||
# $NetBSD: form,v 1.1 2001/04/26 02:26:18 garbled Exp $
|
||||
script:script1 Which daemon to restart?
|
1
share/sushi/procs/restartprocs/help
Normal file
1
share/sushi/procs/restartprocs/help
Normal file
@ -0,0 +1 @@
|
||||
Using this form you can pick the daemon you wish to restart, and restart it.
|
12
share/sushi/procs/restartprocs/script
Executable file
12
share/sushi/procs/restartprocs/script
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:19 garbled Exp $
|
||||
|
||||
if [ "$1" = "none" ]; then
|
||||
echo "None selected, no action taken"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/etc/rc.d/$1 restart
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to restart $1"
|
||||
fi
|
9
share/sushi/procs/restartprocs/script1
Executable file
9
share/sushi/procs/restartprocs/script1
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/04/26 02:26:19 garbled Exp $
|
||||
|
||||
for i in `ls -1 /etc/rc.d`
|
||||
do
|
||||
/etc/rc.d/$i status
|
||||
done 2>&1 | grep -v unknown | grep -v Usage | grep 'is running' | \
|
||||
awk '{print $1}'
|
||||
echo "none"
|
8
share/sushi/procs/showallprocs/Makefile
Normal file
8
share/sushi/procs/showallprocs/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:19 garbled Exp $
|
||||
|
||||
SCRIPTS= script
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/showallprocs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
8
share/sushi/procs/showallprocs/script
Executable file
8
share/sushi/procs/showallprocs/script
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:19 garbled Exp $
|
||||
|
||||
for i in `ls -1 /etc/rc.d | grep -v ipfilter`
|
||||
do
|
||||
/etc/rc.d/$i forcestatus
|
||||
done 2>&1 | grep -v unknown | grep -v Usage | grep -v 'not found' \
|
||||
| grep -vi permission
|
8
share/sushi/procs/showprocs/Makefile
Normal file
8
share/sushi/procs/showprocs/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:19 garbled Exp $
|
||||
|
||||
SCRIPTS= script
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/showprocs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
7
share/sushi/procs/showprocs/script
Executable file
7
share/sushi/procs/showprocs/script
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:19 garbled Exp $
|
||||
|
||||
for i in `ls -1 /etc/rc.d | grep -v ipfilter`
|
||||
do
|
||||
/etc/rc.d/$i status
|
||||
done 2>&1 | grep -v unknown | grep -v Usage
|
10
share/sushi/procs/startallprocs/Makefile
Normal file
10
share/sushi/procs/startallprocs/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:20 garbled Exp $
|
||||
|
||||
FILES= form help
|
||||
FILESDIR=${BINDIR}/sushi/procs/startallprocs
|
||||
SCRIPTS= script script1
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/startallprocs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
2
share/sushi/procs/startallprocs/form
Normal file
2
share/sushi/procs/startallprocs/form
Normal file
@ -0,0 +1,2 @@
|
||||
# $NetBSD: form,v 1.1 2001/04/26 02:26:20 garbled Exp $
|
||||
script:script1 Which daemon to start?
|
1
share/sushi/procs/startallprocs/help
Normal file
1
share/sushi/procs/startallprocs/help
Normal file
@ -0,0 +1 @@
|
||||
Using this form you can pick the daemon you wish to start, and start it.
|
12
share/sushi/procs/startallprocs/script
Executable file
12
share/sushi/procs/startallprocs/script
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:20 garbled Exp $
|
||||
|
||||
if [ "$1" = "none" ]; then
|
||||
echo "None selected, no action taken"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/etc/rc.d/$1 forcestart
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to start $1"
|
||||
fi
|
9
share/sushi/procs/startallprocs/script1
Executable file
9
share/sushi/procs/startallprocs/script1
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/04/26 02:26:20 garbled Exp $
|
||||
|
||||
for i in `ls -1 /etc/rc.d`
|
||||
do
|
||||
/etc/rc.d/$i forcestatus
|
||||
done 2>&1 | grep -v unknown | grep -v Usage | grep 'is not running' | \
|
||||
awk '{print $1}'
|
||||
echo "none"
|
10
share/sushi/procs/startprocs/Makefile
Normal file
10
share/sushi/procs/startprocs/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:20 garbled Exp $
|
||||
|
||||
FILES= form help
|
||||
FILESDIR=${BINDIR}/sushi/procs/startprocs
|
||||
SCRIPTS= script script1
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/startprocs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
2
share/sushi/procs/startprocs/form
Normal file
2
share/sushi/procs/startprocs/form
Normal file
@ -0,0 +1,2 @@
|
||||
# $NetBSD: form,v 1.1 2001/04/26 02:26:20 garbled Exp $
|
||||
script:script1 Which daemon to start?
|
1
share/sushi/procs/startprocs/help
Normal file
1
share/sushi/procs/startprocs/help
Normal file
@ -0,0 +1 @@
|
||||
Using this form you can pick the daemon you wish to start, and start it.
|
12
share/sushi/procs/startprocs/script
Executable file
12
share/sushi/procs/startprocs/script
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:20 garbled Exp $
|
||||
|
||||
if [ "$1" = "none" ]; then
|
||||
echo "None selected, no action taken"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/etc/rc.d/$1 start
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to start $1"
|
||||
fi
|
9
share/sushi/procs/startprocs/script1
Executable file
9
share/sushi/procs/startprocs/script1
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/04/26 02:26:20 garbled Exp $
|
||||
|
||||
for i in `ls -1 /etc/rc.d`
|
||||
do
|
||||
/etc/rc.d/$i status
|
||||
done 2>&1 | grep -v unknown | grep -v Usage | grep 'is not running' | \
|
||||
awk '{print $1}'
|
||||
echo "none"
|
10
share/sushi/procs/stopallprocs/Makefile
Normal file
10
share/sushi/procs/stopallprocs/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:21 garbled Exp $
|
||||
|
||||
FILES= form help
|
||||
FILESDIR=${BINDIR}/sushi/procs/stopallprocs
|
||||
SCRIPTS= script script1
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/stopallprocs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
2
share/sushi/procs/stopallprocs/form
Normal file
2
share/sushi/procs/stopallprocs/form
Normal file
@ -0,0 +1,2 @@
|
||||
# $NetBSD: form,v 1.1 2001/04/26 02:26:21 garbled Exp $
|
||||
script:script1 Which daemon to stop?
|
1
share/sushi/procs/stopallprocs/help
Normal file
1
share/sushi/procs/stopallprocs/help
Normal file
@ -0,0 +1 @@
|
||||
Using this form you can pick the daemon you wish to stop, and stop it.
|
12
share/sushi/procs/stopallprocs/script
Executable file
12
share/sushi/procs/stopallprocs/script
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:21 garbled Exp $
|
||||
|
||||
if [ "$1" = "none" ]; then
|
||||
echo "None selected, no action taken"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/etc/rc.d/$1 forcestop
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to stop $1"
|
||||
fi
|
9
share/sushi/procs/stopallprocs/script1
Executable file
9
share/sushi/procs/stopallprocs/script1
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/04/26 02:26:21 garbled Exp $
|
||||
|
||||
for i in `ls -1 /etc/rc.d`
|
||||
do
|
||||
/etc/rc.d/$i forcestatus
|
||||
done 2>&1 | grep -v unknown | grep -v Usage | grep 'is running' | \
|
||||
awk '{print $1}'
|
||||
echo "none"
|
10
share/sushi/procs/stopprocs/Makefile
Normal file
10
share/sushi/procs/stopprocs/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:21 garbled Exp $
|
||||
|
||||
FILES= form help
|
||||
FILESDIR=${BINDIR}/sushi/procs/stopprocs
|
||||
SCRIPTS= script script1
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/stopprocs
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
2
share/sushi/procs/stopprocs/form
Normal file
2
share/sushi/procs/stopprocs/form
Normal file
@ -0,0 +1,2 @@
|
||||
# $NetBSD: form,v 1.1 2001/04/26 02:26:21 garbled Exp $
|
||||
script:script1 Which daemon to stop?
|
1
share/sushi/procs/stopprocs/help
Normal file
1
share/sushi/procs/stopprocs/help
Normal file
@ -0,0 +1 @@
|
||||
Using this form you can pick the daemon you wish to stop, and stop it.
|
12
share/sushi/procs/stopprocs/script
Executable file
12
share/sushi/procs/stopprocs/script
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:22 garbled Exp $
|
||||
|
||||
if [ "$1" = "none" ]; then
|
||||
echo "None selected, no action taken"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/etc/rc.d/$1 stop
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to stop $1"
|
||||
fi
|
9
share/sushi/procs/stopprocs/script1
Executable file
9
share/sushi/procs/stopprocs/script1
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script1,v 1.1 2001/04/26 02:26:22 garbled Exp $
|
||||
|
||||
for i in `ls -1 /etc/rc.d`
|
||||
do
|
||||
/etc/rc.d/$i status
|
||||
done 2>&1 | grep -v unknown | grep -v Usage | grep 'is running' | \
|
||||
awk '{print $1}'
|
||||
echo "none"
|
8
share/sushi/procs/topcpu/Makefile
Normal file
8
share/sushi/procs/topcpu/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:22 garbled Exp $
|
||||
|
||||
SCRIPTS= script
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/topcpu
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
4
share/sushi/procs/topcpu/script
Executable file
4
share/sushi/procs/topcpu/script
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:22 garbled Exp $
|
||||
|
||||
ps -aux | sort -rnk 3 | head -15
|
8
share/sushi/procs/topmem/Makefile
Normal file
8
share/sushi/procs/topmem/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:23 garbled Exp $
|
||||
|
||||
SCRIPTS= script
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/topmem
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
4
share/sushi/procs/topmem/script
Executable file
4
share/sushi/procs/topmem/script
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:23 garbled Exp $
|
||||
|
||||
ps -aux | sort -rnk 4 | head -15
|
8
share/sushi/procs/toptime/Makefile
Normal file
8
share/sushi/procs/toptime/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.1 2001/04/26 02:26:23 garbled Exp $
|
||||
|
||||
SCRIPTS= script
|
||||
SCRIPTSDIR=${BINDIR}/sushi/procs/toptime
|
||||
MKOBJ= no
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
4
share/sushi/procs/toptime/script
Executable file
4
share/sushi/procs/toptime/script
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: script,v 1.1 2001/04/26 02:26:23 garbled Exp $
|
||||
|
||||
ps -aux | sort -rnk 10 | head -15
|
Loading…
x
Reference in New Issue
Block a user