Sponsored Content
Top Forums Shell Programming and Scripting list of all predecessors and successors for given PID Post 302579322 by jim mcnamara on Monday 5th of December 2011 12:25:27 PM
Old 12-05-2011
Look into the ps command.

Code:
ps -aef --forest

may be a starting point for you.
 

10 More Discussions You Might Find Interesting

1. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies

2. UNIX for Dummies Questions & Answers

getting PID

Hi , I am trying to get the PID using the following command: $ /usr/ucb/ps -auwwwwx | grep java | grep Proceess | ptree PID or $ /usr/ucb/ps -auwwwwx | grep java | grep Proceess;ptree PID it is possible to get PID, such that I check whether any orphan process is running. solution... (0 Replies)
Discussion started by: Rakesh Bhat
0 Replies

3. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

4. Shell Programming and Scripting

KILL PID, intern should kill another PID.

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

5. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

6. UNIX for Dummies Questions & Answers

Another PID ?

I have searched to find an anwer to no avail, I hope you can help me. I have a.ksh that many people call and a.ksh calls b.ksh b.ksh is also invoked stand-alone by many people as well In b.ksh I want to do something different if it was not involked by a.ksh. How can I do this? (7 Replies)
Discussion started by: CAGIRL
7 Replies

7. Programming

Print ancestor list in c (name and PID)

I am trying to write a C program that prints its ancestor name and PID For example: Lets say my program name is prog1 then the output should be prog1 with PID: 2345 bash with PID: 4567 .... init with PID: 1 This is just a scratch work. #include <stdio.h> #include <unistd.h> #include... (5 Replies)
Discussion started by: nimesh
5 Replies

8. Shell Programming and Scripting

Unix Script -- Suggestions to list and kill PID's sequentially

Hi, I'm trying to write a script where i'm trying to grep the PID and the associated file and list them. Then execute the KILL command sequentially on the listed PID's for ".tra" files ==================================================== ps -aux | grep mine adm 27739 0.2 0.8 1131588... (12 Replies)
Discussion started by: murali1687
12 Replies

9. Shell Programming and Scripting

Pid=$!

Hello, I would like to know what this command means? PID=$! what does "!" stand for? (5 Replies)
Discussion started by: googlietdr
5 Replies

10. Shell Programming and Scripting

How to list all outbound sockets given a PID?

I used netstat -tp <pid> to list all Foreign Addresses i.e OutBound sockets on Linux. Likewise, i wish to list all Foreign Addresses on Sparc Solaris. I get illegal option -- t when i try this command on Solaris. The second query i have is that in the output of netstat command some... (1 Reply)
Discussion started by: mohtashims
1 Replies
iwidgets::entryfield(1) 					  [incr Widgets]					   iwidgets::entryfield(1)

__________________________________________________________________________________________________________________________________________________

NAME
iwidgets::entryfield - Create and manipulate a entry field widget SYNOPSIS
iwidgets::entryfield pathName ?options? INHERITANCE
itk::Widget <- iwidgets::LabeledWidget <- iwidgets::Entryfield STANDARD OPTIONS
background borderWidth cursor exportSelection foreground highlightColor highlightThickness insertBackground insertBorderWidth insertOffTime insertOnTime insertWidth justify relief selectBackground selectBorderWidth selectForeground textVariable width See the "options" manual entry for details on the standard options. ASSOCIATED OPTIONS
show state See the "entry" manual entry for details on the associated options. INHERITED OPTIONS
disabledForeground labelBitmap labelFontlabelImage labelMargin labelPos labelText labelVariable state sticky See the "labeledwidget" class manual entry for details on the inherited options. WIDGET-SPECIFIC OPTIONS Name: childSitePos Class: Position Command-Line Switch: -childsitepos Specifies the position of the child site in the entry field: n, s, e, or w. The default is e. Name: command Class: Command Command-Line Switch: -command Specifies a Tcl command to be executed upon detection of a Return key press event. Name: fixed Class: Fixed Command-Line Switch: -fixed Restrict entry to the specified number of chars. A value of 0, which is the default, denotes no limit. The value is the maximum number of chars the user may type into the field, regardles of field width. For example, if the field width is set to 20 and the fixed value is 10, the user will only be able to type 10 characters into the field which is 20 characters long. Name: focusCommand Class: Command Command-Line Switch: -focuscommand Specifies a Tcl command to be executed upon reception of focus. Name: invalid Class: Command Command-Line Switch: -invalid Specifies a Tcl command to be executed upon determination of invalid input. The default is bell. Name: textBackground Class: Background Command-Line Switch: -textbackground Background color for inside textual portion of the entry field. The value may be given in any of the forms acceptable to Tk_Get- Color. Name: textFont Class: Font Command-Line Switch: -textfont Name of font to use for display of text in entryfield. The value may be given in any of the forms acceptable to Tk_GetFont. Name: pasting Class: Behavior Command-Line Switch: -pasting Option to enable/disable pasting into the entry component of the entryfield. Valid values are 0 (disabled) or 1 (enabled). Defaults to 1. Name: validate Class: Command Command-Line Switch: -validate The validate option allows specification of a validation mechanism. Standard character validation such as numeric, alphabetic, integer, hexidecimal, real, and alphanumeric can be handled through the use of keywords. Should more extensive validation be neces- sary, the value may contain the name of a command script. The script should return a boolean value. True for valid, false for invalid. If false is returned, then the procedure associated with the invalid option will be invoked. If the validation script contains any % characters, then the script will not be executed directly. Instead, a new script will be generated by replacing each %, and the character following it, with information from the entryfield. The replacement depends on the character following the %, as defined in the list below. %c Replaced with the current input character. %P Replaced with the contents of the entryfield modified to include the latest keystoke. This is equivalent to peeking at the future contents, enabling rejection prior to the update. %S Replaced with the current contents of the entryfield prior to the latest keystroke being added. %W Replaced with the entryfield widget pathname. __________________________________________________________________________________________________________________________________________________ DESCRIPTION
The iwidgets::entryfield command creates an enhanced text entry widget with an optional associated label. Addtional options support vali- dation and establishing a upper limit on the number of characters which may be entered in the field. METHODS
The iwidgets::entryfield command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for entryfield widgets: ASSOCIATED METHODS
delete get icursor index insert scan selection xview See the "entry" manual entry for details on the associated methods. WIDGET-SPECIFIC METHODS pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the iwid- gets::entryfield command. pathName childsite Returns the path name of the child site. pathName clear Clear entry widget pathName configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwidgets::entryfield command. COMPONENTS
Name: efchildsite Class: frame The efchildsite component is the user child site for the entry field. See the "frame" widget manual entry for details on the efchildsite component item. Name: entry Class: entry The entry component provides the entry field for user text input and display. See the "entry" widget manual entry for details on the entry component item. EXAMPLE
package require Iwidgets 4.0 option add *textBackground white proc returnCmd {} { puts stdout "Return Pressed" } proc invalidCmd {} { puts stdout "Alphabetic contents invalid" } iwidgets::entryfield .ef -command returnCmd iwidgets::entryfield .fef -labeltext "Fixed:" -fixed 10 -width 12 iwidgets::entryfield .nef -labeltext "Numeric:" -validate numeric -width 12 iwidgets::entryfield .aef -labeltext "Alphabetic:" -validate alphabetic -width 12 -invalid invalidCmd iwidgets::entryfield .pef -labeltext "Password:" -show 267 -width 12 -command returnCmd iwidgets::Labeledwidget::alignlabels .ef .fef .nef .aef .pef pack .ef -fill x -expand yes -padx 10 -pady 5 pack .fef -fill x -expand yes -padx 10 -pady 5 pack .nef -fill x -expand yes -padx 10 -pady 5 pack .aef -fill x -expand yes -padx 10 -pady 5 pack .pef -fill x -expand yes -padx 10 -pady 5 AUTHOR
Sue Yockey Mark L. Ulferts KEYWORDS
entryfield, widget Tk iwidgets::entryfield(1)
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy