stat
This commit is contained in:
parent
999a81d3ac
commit
f3435ec58b
2 changed files with 38 additions and 0 deletions
27
lp/stat/generic
Executable file
27
lp/stat/generic
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/local/plan9/bin/rc
|
||||||
|
if (! ~ $DEBUG '') flag x +
|
||||||
|
|
||||||
|
if (~ $THIS_HOST $DEST_HOST) {
|
||||||
|
if (test -f $LPLIB/log/$LPDEST^.st) {
|
||||||
|
echo status:
|
||||||
|
tail -3 $LPLIB/log/$LPDEST^.st
|
||||||
|
}
|
||||||
|
cd $LPSPOOL
|
||||||
|
if (test -d $LPDEST) {
|
||||||
|
once=''
|
||||||
|
for (i in `{bind -b $LPLIB/sched /bin;$SCHED $LPDEST}) {
|
||||||
|
if (~ $once '') {
|
||||||
|
echo
|
||||||
|
echo queue on $THIS_HOST:
|
||||||
|
echo 'job user try size'
|
||||||
|
once=1
|
||||||
|
}
|
||||||
|
STATLINE=`{cat $LPDEST/$i^id}
|
||||||
|
LSLINE=`{ls -l $LPDEST/$i}
|
||||||
|
echo $STATLINE(1)^$STATLINE(3)' '$STATLINE(2)' '$STATLINE(4)' '$LSLINE(6)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if not {
|
||||||
|
{ echo -d$LPDEST -q; sleep 5 } | lpsend $DEST_HOST
|
||||||
|
}
|
||||||
11
lp/stat/lpd
Executable file
11
lp/stat/lpd
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
|
if (! ~ $DEBUG '') flag x +
|
||||||
|
|
||||||
|
echo transmission log:
|
||||||
|
if (test -r $LPLIB/log/$LPDEST^.st) {
|
||||||
|
tail -3 $LPLIB/log/$LPDEST^.st
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
echo printer queue:
|
||||||
|
lpdsend -q -d$OUTDEV $DEST_HOST
|
||||||
Loading…
Add table
Add a link
Reference in a new issue