Sponsored Content
Full Discussion: comparing PIDs in shell..
Top Forums Shell Programming and Scripting comparing PIDs in shell.. Post 302152271 by marconi on Wednesday 19th of December 2007 10:17:58 AM
Old 12-19-2007
comparing PIDs in shell..

Hi,

There is a file having a list of running PIDs and another file having a list of registered PIDs. How can we check if the number of running PIDs are less or more than the registered PIDs, comparing the total no. in each and also each value.

Request you to pls give your inputs.

Thanks a lot in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing 2 dates in Bourne shell

HI, I am able to find days difference using FIND command. However it is comparing between today and the last time it was modified. I now need to find the difference between a date specified by myself and the last time the file was modified. Is there a command which I can use or I have to... (1 Reply)
Discussion started by: scmay
1 Replies

2. Shell Programming and Scripting

Shell Script for PIDs

I am trying to write a Shell script wherein the shell needs to read a list of PID in the File $stat/bin/Process and compare it to the PID of the processes running on a server. Also the script should return KO(not OK) with corresponding label :- a) When an environmental variable not... (2 Replies)
Discussion started by: marconi
2 Replies

3. Shell Programming and Scripting

Comparing PIDs in a Shell...

Hi, There is a file having a list of running PIDs (pid_process) and another file having a list of registered PIDs (pid_regieter). I want to check if:- a) there is at least one running PID that does not correspond to a registered PID (listing the PID not registered in the file) ... (1 Reply)
Discussion started by: marconi
1 Replies

4. Shell Programming and Scripting

Comparing each of the value in a column with the known value - in Shell

I have the column as 2.14% 1.42% 0.64% 0.50% 0.44% 0.38% 0.38% 0.36% 0.35% 0.35% 0.32% 0.32% 0.31% 0.30% 0.30% I want to find out if any of these values is greater than 75%, is yes then print that value. (2 Replies)
Discussion started by: Santosh251982
2 Replies

5. Solaris

Conflict with PIDs

I am trying to determine the root cause of a java process that dies trying to startup during it's cron job. I did go ahead and change the time that it starts up in the cron file and now it starts successfully. However is there a way to determine what PID a process was attempting to get when... (5 Replies)
Discussion started by: vedder191
5 Replies

6. Shell Programming and Scripting

Comparing 2 file use c shell script

Hi all, I got 2 file : file1: file2: output: But , must write out in C shell.Anybody can help solve? (6 Replies)
Discussion started by: proghack
6 Replies

7. Shell Programming and Scripting

comparing 2 files in shell script

I have 2 files config1h.txt ----------------- BFMU=ENABLE,ID=PM THR=OFF,REP=ALL,CON=IACM,TIM=OFF;GPON collection strategy 1.3.6.1.2.1.2.2:8 1.3.6.1.2.1.2.2:7 1.3.6.1.4.1.637.61.1.35.11.4:4 1.3.6.1.4.1.637.61.1.35.11.4:3 1.3.6.1.4.1.637.61.1.35.10.1:2 1.3.6.1.4.1.637.61.1.35.10.1:43... (7 Replies)
Discussion started by: LavanyaP
7 Replies

8. Shell Programming and Scripting

Need help to kill pids

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)
Discussion started by: prany_cool
4 Replies

9. Shell Programming and Scripting

Comparing dates in shell script

Hi All, I have a date variable say dt="2014-01-06 07:18:38" Now i need to use this variable to search a log and get the entries which occured after that time. (1 Reply)
Discussion started by: Girish19
1 Replies

10. Shell Programming and Scripting

Get all associated pids

im looking for a portable way to get the PID of the script that is running, and to get every other PIDs that are spawned from it. and by ever other PIDs, i presume, that would be "child processes". however, i want to shy away from using any command that is not available on every single unix... (1 Reply)
Discussion started by: SkySmart
1 Replies
process_id_max(5)						File Formats Manual						 process_id_max(5)

NAME
process_id_max - limit the maximum value for process IDs (PIDs) VALUES
Failsafe Default Minimum Maximum must be greater than or equal to If the difference between and inclusive is less than is effectively limited to this difference. DESCRIPTION
The tunable allows the administrator to select a potential value range for process IDs (PIDs) as generated by (see fork(2)). It allows the administrator to select a balance between compatibility, capacity, and aesthetics. Warning: Some programs cannot tolerate PID values up to the maximum. If such programs exist and are critical, the maximum PID should be appropriately constrained. For more details on these concerns, see below. Who is Expected to Change This Tunable? Anyone. Restrictions on Changing Do not increase the maximum PID if there are critical applications which assume that PIDs fit into a restricted range. (See below). The value of can be increased at any time, and it takes effect immediately. (However, its effect may not be noticed until a sufficient number of new processes have been created to cause the system to utilize the available higher values.) A decrease in the value of also takes effect immediately. However any existing processes with PIDs that are higher than the new value are not affected. The decrease will be in full effect for all processes only after a reboot. When Should the Value of This Tunable Be Raised? Increase the maximum PID if the range of PIDs defined by the and tunables needs to be increased to allow the creation of more simultaneous processes. See nproc(5) for limits on the number of processes. Increase the maximum PID in systems which have many active processes (for example, >25,000). The larger range may increase the efficiency of creating of new processes (because it may take less work to find available PIDs). If it is desired to validate that software programs execute properly in environments where PID values may be large, increase the tunable along with the tunable to force all new process IDs to take on large values. (See process_id_min(5) for more information.) Do not increase the maximum PID if there are critical applications which assume that PIDs fit into a restricted range. (See below.) What are the Side Effects of Raising the Value? If the difference between and tunables is less than the number of processes allowed to exist simultaneously is limited to that difference. When Should the Value of This Tunable Be Lowered? Lower the maximum PID if critical applications make assumptions that the PID range is restricted. What are the Side Effects of Lowering the Value? If the difference between and tunables is less than the number of processes allowed to exist simultaneously is limited to that difference. What Other Tunable Values Should Be Changed at the Same Time? It may be desirable to change For program development and validation, a change in the tunable may also be needed. Potential Application Issues The range of PID values has, in the past, been restricted to 0..30,000. Some programs have built-in assumptions about this range. This section briefly describes some of those assumptions. Some application programs have a built-in assumption that a PID does not exceed 30,000 (which was the old value of the (undocumented) and constants). They could fail if PIDs exceed this maximum. Some application programs store PIDs in 16-bit variables (type in C). Such programs could fail if the maximum PID exceeds 32,767. Some programs provide output formats which can be sensitive to the number of digits in the PID. Such programs may produce aesthetically displeasing output if PIDs exceed 5 digits (exceed 99,999). In some cases automatic expansion of output fields can disturb column align- ment. In some other cases, adjacent fields could run together, making the output incomprehensible. Some programs or scripts parse the outputs of other programs which contain PID values. Some such programs have built-in assumptions that a PID will not exceed five character positions. Such a program could fail if the range exceeds 99,999. Because session IDs (SIDs) and process group IDs (PGIDs) are the same as the process ID of the session or group leader, an increase in the maximum PID also increases the maximum SID and PGID. Though much less likely, the same application issues may exist for SIDs and PGIDs. WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX. The HP-UX kernel may silently round the selected values for and/or (e.g., to the nearest power of 2) in order to accommodate the PID gener- ation algorithm. Do not increase the maximum PID if there are critical applications which assume that PIDs fit into a restricted range. See the previous section, for more details on such programmatic assumptions. The default maximum (30,000) has been selected to provide compatibility with all such programs. This value should be used if program sensitivity to larger PID values is unknown. See process_id_min(5) for informa- tion about how large PID values can be selected for software validation purposes. Increasing the PID range does not increase the maximum number of processes in the system. Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun- able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see at AUTHOR
was developed by HP. SEE ALSO
fork(2), nproc(5), process_id_min(5). whitepaper, available on Tunable Kernel Parameters process_id_max(5)
All times are GMT -4. The time now is 01:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy