First of all, I'd like to congratulate this big family and all members for all the work you do!
I'm trying to do an script or sentence which kills an specific printers PIDs: all printers PIDs older than 72h running in the server.
Steps:
1.- List all printers PID sorting by date:
2.-Isolate PPID = spooler ID (no killed)
3.-PIDs to be killed (no kills the spooler PPID "11814"):
4.- Kill all the PIDs of step 3 except the spooler PPID 11814.
Hey people
I am currently working on a print spooler for unix over a network. I need help regarding the status of the printer. Is there any way to know when the printer has finished a previous job, so that the next job from the queue can be processed. Also is there any other way to print other... (0 Replies)
Hi All,
In my project i have two process runs in the back end.
Once i start my project, and execute the command ps, i get below output:
PID TTY TIME CMD
9086 pts/1 0:00 ksh
9241 pts/1 0:02 java
9240 pts/1 0:00 shell_script_bg
java with 9241 PID is the main... (4 Replies)
Hellow Experts
i have one problem.
i run one script in backgroun.
and i want to kill that script with only script name.....
so what's the solution..
for your info
my script name is "testscript" n it contains "sleep 100"
thanks.... (16 Replies)
Hi,
On my Linux machine, using Bash, I sometimes run into a situation where doing the following does not seem to work at all.
kermit@fastbox ~ $ ps -A | grep firefox-bin
5375 ? 00:06:57 firefox-bin <defunct>
5624 ? 00:00:00 firefox-bin
kermit@fastbox ~ $ kill 5624... (7 Replies)
I have a script that conducts some SSH calls and I would like to capture the child info so that I can do a sleep and then a cleanup to make sure they do not stay out there as ghosts.
I was told I could do something like this...
#!/bin/sh
for m = job1, job2, job3
x=1... (4 Replies)
Hi,
I wrote a script to kill a process id.
I am able to kill the PID only if I enter the root password in the middle of the execution because I did not run as root i.e after i run the script from the terminal, instead of killing directly, it is killing only after entering the pass when it... (12 Replies)
Hi there !!!
I am writing a script to kill the pids on different linux boxes :cool:
the output of my command gives the pids running on that box, but how can I kill all the pids without looping? :confused:
Code:
ssh $i ps -fu $USER | grep ManServer | grep -v grep | awk '{print $2}' | kill
... (4 Replies)
Hello Friends,
I've been trying to write a one line which checks java processes and filter them for a user (testuser) and then check process arguments with PARGS command and then check if there is certain patterns exists in pargs output then kill the process.
I have tried the following so... (2 Replies)
I created a program to kill long running pid processes.
I am getting the following error message:
-f command cannot be found.
I also want to count the number of pids that are killed and append the results to a text file. I am new to shell script programming.
1.The first part of code... (10 Replies)
Discussion started by: dellanicholson
10 Replies
LEARN ABOUT SUNOS
lpsched
lpsched(1M) System Administration Commands lpsched(1M)NAME
lpsched - start the LP print service
SYNOPSIS
lpsched [-f num_filters] [-n num_notifiers] [-p fd_limit] [-r reserved_fds]
DESCRIPTION
The lpsched command starts or restarts the LP print service.
The lpshut command stops the LP print service. Printers that are restarted using lpsched reprint (in their entirety) print requests that
were stopped by lpshut. See lpshut(1M).
It is recommended that you start and stop the LP print service using svcadm(1M). See NOTES.
OPTIONS
The following options are supported:
-f num_filters Specifies the number of concurrent slow filters that may be run on a print server. A default value of 1 is used if
none is specified. Depending on server configuration, a value of 1 may cause printers to remain idle while there
are jobs queued to them.
-n num_notifiers Specifies the number of concurrent notification processes that can run on a print server. A default value of 1 is
used when none is specified.
-p fd_limit Specifies the file descriptor resource limit for the lpsched process. A default value of 4096 is used if none is
specified. On extremely large and active print servers, it may be necessary to increase this value.
-r reserved_fds Specifies the number of file descriptors that the scheduler reserves for internal communications under heavy load.
A default value of 2 is used when none is specified. It should not be necessary to modify this value unless
instructed to do so when troubleshooting problems under high load.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
non-zero An error occurred.
FILES
/var/spool/lp/* LP print queue.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWpsu |
+-----------------------------+-----------------------------+
SEE ALSO lp(1), svcs(1), lpstat(1), lpadmin(1M), lpmove(1M), lpshut(1M), svcadm(1M), attributes(5), smf(5)
System Administration Guide: Basic Administration
NOTES
The lpsched service is managed by the service management facility, smf(5), under the service identifier:
svc:/application/print/server
Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser-
vice's status can be queried using the svcs(1) command.
SunOS 5.10 3 Sep 2004 lpsched(1M)