Sponsored Content
Top Forums UNIX for Dummies Questions & Answers determine pid from ps -ef | grep something Post 302312719 by harlock59 on Sunday 3rd of May 2009 02:26:24 AM
Old 05-03-2009
Error

Hello,

i am trying to upgrade my aptitude (i mean "sudo aptitude upgrade") ! but i get an error with a resource taken by another process.

i typed ps -e and killed one process ("update-agent" i think), but it was not the one.

i can't remember the command line with grep to identify which process is holding the hand of that file.

the file is /var/lib/dpkg/lock

can i find the one using grep and something ?

thanks.
 

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

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

3. 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

4. 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

5. Shell Programming and Scripting

how to grep parent process PID in shell scripting

hi all, for an example: $ ps -ef | grep apache | awk '{ print $2, $3 }' 24073 11784 28021 1 28022 1 28038 1 28041 28040 28045 28041 28047 28041 28040 1 28049 28041 28051 28041 28053 28041 28030 1 28054 28041 28055 28041 28056 28041 28057 28041 (5 Replies)
Discussion started by: raghur77
5 Replies

6. Shell Programming and Scripting

Using grep to extract PID

Hi unix experts! I need help to solve the following problem: I'm getting the prstat info: stats=`prstat 0 1` #dont worry about how many processes are running I'm aware that no all processes will be listed without the -n (specify number) then I'm doing the following to extract the... (2 Replies)
Discussion started by: sanjaybhatt6
2 Replies

7. Shell Programming and Scripting

grep PID and collect data ?

I have a file current.csv file 2011/05/06 11:12:20 | 16:guest pid=014782 opened Boards 0, 1, 2, 3 2011/05/06 12:23:13 | 16:guest pid=014782 closed 2011/05/06 12:26:05 | 17:guest pid=022383 opened Boards 0, 1, 2, 3 2011/05/06 20:09:04 | 17:guest pid=022383 closed 2011/05/06... (5 Replies)
Discussion started by: sabercats
5 Replies

8. Shell Programming and Scripting

Error in finding the PID by grep and assigning to a variable

Hello All, I am facing difficulty in getting the PID value & then assigning it to a variable, kindly help me in resolving the issue. Thanks a lot in advance. The custom utility used inside the Test2.sh will process the file in a batch of 10 lines at once and for efficient memory management,... (3 Replies)
Discussion started by: duddukuri
3 Replies

9. UNIX for Dummies Questions & Answers

Determine uniqueness of pid to name output files

Hi, We've a process on AIX UNIX server which is executed by multiple uses during a day. I wish to create a log file for every time the process is executed. I wish to know how unique are PID(s) on AIX UNIX servers if I were to name the log files with <date> and <PID>? E.g. If I create my... (1 Reply)
Discussion started by: vkumbhakarna
1 Replies

10. AIX

How to grep PID and program name from netstat in AIX?

Hi All, I am using netstat on AIX to grep info on all open connections. However, unlike on Linux(Centos), I do not get the PID and program name using netstat on AIX. I need this info to be clubbed along with the information retrieved using netstat version of AIX. Is there a way this can be... (1 Reply)
Discussion started by: Vipin Batra
1 Replies
APTITUDE-RUN-ST(1)					      Command-line reference						APTITUDE-RUN-ST(1)

NAME
aptitude-run-state-bundle - unpack an aptitude state bundle and invoke aptitude on it SYNOPSIS
aptitude-run-state-bundle [<options>...] <input-file> [<program> [<arguments>...]] DESCRIPTION
aptitude-run-state-bundle unpacks the given aptitude state bundle created by aptitude-create-state-bundle(1) to a temporary directory, invokes <program> on it with the supplied <arguments>, and removes the temporary directory afterwards. If <program> is not supplied, it defaults to aptitude(8). OPTIONS
The following options may occur on the command-line before the input file. Options following the input file are presumed to be arguments to aptitude. --append-args Place the options that give the location of the state bundle at the end of the command line when invoking <program>, rather than at the beginning (the default is to place options at the beginning). --help Display a brief usage summary. --prepend-args Place the options that give the location of the state bundle at the beginning of the command line when invoking <program>, overriding any previous --append-args (the default is to place options at the beginning). --no-clean Do not remove the unpacked state directory after running aptitude. You might want to use this if, for instance, you are debugging a problem that appears when aptitude's state file is modified. When aptitude finishes running, the name of the state directory will be printed so that you can access it in the future. This option is enabled automatically by --statedir. --really-clean Delete the state directory after running aptitude, even if --no-clean or --statedir was supplied. --statedir Instead of treating the input file as a state bundle, treat it as an unpacked state bundle. For instance, you can use this to access the state directory that was created by a prior run with --no-clean. --unpack Unpack the input file to a temporary directory, but don't actually run aptitude. SEE ALSO
aptitude-create-state-bundle(1), aptitude(8), apt(8) AUTHOR
Daniel Burrows <dburrows@debian.org> Author. COPYRIGHT
Copyright 2007 Daniel Burrows. This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. aptitude-run-state-bundle 0.6. 08/08/2011 APTITUDE-RUN-ST(1)
All times are GMT -4. The time now is 01:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy