General :: Determine What Files Are Being Accessed By A Process
Mar 23, 2010How would I find out all the files a particular process accesses?
I am using Ubuntu 9.04.
How would I find out all the files a particular process accesses?
I am using Ubuntu 9.04.
I'm writing a C++ application and need to work with process substitution in the Bash shell. I'm trying to find a way to validate the paths passed as arguments to my program, some of which point to FIFO files created by process substitution.
Is there a shell (or C++) way that I can check if the system creates these files in /dev/fd or if they are created somewhere else?
I'd like to determine what process has ownership of a lock-file. The lock-files are simply a file with a specific name that has been created.So, how can I determine what process has a particular file open in Linux? Preferably a one-liner type or a particular Linux tool solution would be optimal.
View 3 Replies View RelatedI am writing, well actually enhancing, a script to do a daily backup of important data on my PC to a second hard drive.I wish to tar my home directory to a single file - and will probably use gzip as well.So I decided to work out the correct tar syntax in a terminal first - here is what happened.I opened a terminal window.I cd to a directory not part of my home directory.I issued the command..Quote: tar -cvf mytar.tar /home/ken tar processed a bunch of files, the last being .netrc.I examined the tar file and it contains .netrc.The contents of .netrc are correct.I scrolled back through the list of files in the terminal window and do not see any error messages.I guess the question is... how do I determine what file tripped up the tar process?
View 8 Replies View RelatedI have Fedora Linux 13 64bit system. I use System Monitor to check which process is taking how much memory and cpu. Normally I have dozens of Chrome and Firefox windows open. The Processes tab shows which process is taking how much cpu/ram resources but I unfortunately there is no option like right click and make the window active that matches the PID (the one process that I have currently highlighted). Usually there is a chrome process taking up 30 or 40 percent of CPU while dozens other chrome processes taking much less cpu. I must determine which chrome window ( or any application which has multiple instances running) is taking that much CPU time.
View 1 Replies View RelatedWith the find command it is easy to find files that have been modified or accessed within a given period. When a file is created, the acesss time is the same as the modify time. But as soon it is accessed (read), the access time changes, but the modify time does not. I need to find files that been accessed at all, ie. files which have access time newer than modify time. How do I do that?
View 2 Replies View RelatedCommand to find all of the files which have been accessed within the last 30 days?
View 1 Replies View RelatedI'm developing a serial port application under Lazarus using the SunaSer code library.
The application reports an error indicating that "the Port is opened by another process".
What command can I execute in a Terminal session to determine what process has the USB-serial port open?
I have Fedora Linux 13 64bit system. I use System Monitor to check which process is taking how much memory and cpu. Normally I have dozens of Chrome and Firefox windows open. The Processes tab shows which process is taking how much cpu/ram resources but I unfortunately there is no option like right click and make the window active that matches the PID (the one process that I have currently highlighted). Usually there is a chrome process taking up 30 or 40 percent of CPU while dozens other chrome processes taking much less cpu. I must determine which chrome window ( or any application which has multiple instances running) is taking that much CPU time. So can some one help me to solve this problem?
View 1 Replies View RelatedI want to generate a temporary random list from a directory of files and then determine the size of an arbitrary block of files from this list (say 1-25 or 26-50) and add their names to a file along with some other info for each name. I can generate a random list with file sizes like this: ls -l | sort -R | cut -d " " -f 6 but i'm not sure how to add up the sizes of just a certain block of these files and at the same time save the file names.
View 2 Replies View RelatedIs there a way (I'm on kde) to view files (hopefully in dolphin but I'll take anything) by the date at which they were last accessed?
View 7 Replies View RelatedI recently install 13.37 x64 and I'm attempting to get my video card going but I'm having some problems with X11 currently. After running xorgsetup I checked the xorg.conf file with VI editor and the device was configured as "modesetting". I have the "nouveau" driver blacklisted and attempted to use the more stable "nv" driver with my GeForce 9800 GT and the xserver crashes claiming several files can not be found/accessed. The "vesa" driver issues a highly garbled screen and crashes as well.
The driver now claims a kernel module has possession of the video card and the "nv" driver will no longer work. Anyone have any idea because this did not happen when I used version 13.1 x64 with the same card and had X11 configured with "nv" until I could install the Nvidia proprietary driver.
Edit: (update) I reinstalled 13.37 again and this time it registered the X11 server under "nv" as the driver using xorgsetup, yet it still required the "nouveau" driver edited in to actually enable X11. I'm going the SBo Nvidia packages possibly later tonight or tomorrow anyway. Hopefully it should work fine until then.
i made a program to list all the files in a directory,is there a way to determine what are directories and what are files ?
View 5 Replies View RelatedI have some random files in a folder. I want to rename all of the files in a batch process. I have a text file that contains the Currentname of all the files in the folder, as well as a text file with all of the Newname of files in the folder. I want to replace Currentnames with Newnames.
For example, here are the names of the files in the folder:
1.mp4
2.mp4
3.mp4
I have a text file with the Currentname of all the files in the folder:
1.mp4
2.mp4
3.mp4
I have a text file with the proper Newname of the file:
a.mp4
b.mp4
c.mp4
I want to rename Currentname with Newname in the folder. So when I go to the folder the Newname of the files are:
a.mp4
b.mp4
c.mp4
I'm rather new to linux, and I have a dedi server. I know how to browse, install, remove etc, all the basics needed to use it. I've installed flvtool2, memcoder and ffmpeg, and at the moment im converting avi files in to flv. Im then passing metadata using yamdi.
However, this process is very timely as im converting loads of avi files at a time.Im looking for a script, or a way where I can execute one command/script and which will convert all files in the directory I specify, then run those converted files through yamdi.Im guessing it would be some sort of loop, and then changing for each file?
I have used search and google but i can't see to find an answer to this (if it's here please link and spank me for search-failing I admin a server that serves small (static) images as part of a bigger site. There is about 1 TB of images, but most of the are seldom accessedThe problem: Large cheap disks are slow and i would like to move the most accessed images to something faster (be it a server with faster disk in better raid or a machine with ram-cache or SSD or whatev). But how do i find the "top accessed files in period X"? Anyone have an idea? It's probably an obvious cat-grep-sed-mangle of something in /proc but i just can't solve it on my own.
View 3 Replies View RelatedI have two networks on a server. One being my internal network, and the other being an external IP address. This is on Debian Lenny. Here is my /etc/network/interfaces file:
I can reboot my system and sometimes eth1 is accessible from SSH, and other times eth0 is accessible. Then sometimes eth1 will just stop being pingable alltogether. This is a fairly fresh install of Debian, and the only thing I have running is VMWare Server 2.0, bridged to both of my network connections.
Here is what my route looks like:
How to determine what type of files clamav can scan? For example, if there is no unrar installed it can't scan files in it. So is there any way to find out all types of files that clamav can't scan?
View 2 Replies View RelatedLets say a BIOS interrupt is requested after the O.S is loaded. How is the BIOS code made available? Is it left it RAM even after the O.S boots?
View 3 Replies View RelatedGet the list of virtual addresses being accessed by any application during its execution time. I don't want the complete memory map but just the pages which were accessed during an application's execution?
View 2 Replies View RelatedI'm looking to find out how many times a file has been displayed on the web. I've setup Google Analytics link tracking but I'm trying to figure out how many times BEFORE Google analytics was setup people clicked and viewed a pdf file.
Is there a script that I could run through the log files to find out how many times it has been served?
We have one ftp server. Number of users are using it remotly. My requirement is that suppose any user is not connecting to the server using FTP for 15 days then account should get expired/locked automatically. Is it possible?
View 2 Replies View RelatedHow to get the list of virtual addresses being accessed by any application during its execution time. I don't want the complete memory map but just the pages which were accessed during an application's execution?
View 2 Replies View RelatedI have an Ubuntu server in which a file is dumped every hour and a new file for the next hour and the process continues. If there is any problem due to which the creation of file stops then empty files are created every minute till the process is killed & started again. I need help to make a shell script to check if the empty files are being created and then kill the process and start it again.It would be a great help if anyone can help me regarding this.
View 9 Replies View RelatedI need to process billions of small files using bash shell commands with limited memory size (256MB). If any of those files contain certain "keywords", the file will be removed. I tried with command:
find . -type f -exec grep -i -l -H "keyword" '{}' + | xargs rm -rf
where all files are located within the current directory. But the command above failed in "out of memory".
one tell me the internal working of kill command. that is how it kills a process internally or from where it picks file to continue its process.
View 3 Replies View RelatedI have a high priority service that I start with sudo nice -n -10 process. This process does not need superuser rights though, except for the priority elevation. But nice requires superuser privileges to elevate priority.
View 3 Replies View Relatedsend the details raid configuration how to use in linux el5 and how to indentify the raid degrade process and how to rebuilt the process.
View 4 Replies View RelatedCode:
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
[code]....
Description of what the code does or what i intended to do:
1. Created a child process from parent process using 'fork()'
2. Sent a signal 'SIGALRM' from child process to parent process using 'sigqueue' function.
(The Third parameter of 'siqueue' function contains the message (message msg) which the child process wants to send to the parent process.'msg' is a stucture instance containing a) pid of child and b) string) 5. Print the 'msg' sent by child process inside the signal handler function 'sig_action_function' of the parent process I am getting some junk value when this line is executed
Code:
printf("%d
",msg->cpid);
I expected to get the pid of child process, which the child process sent to parent process through the signal.
as we all know Process Scheduler does Process scheduling and its a process as well. I was just wondering that if this happens then the Process "Process Scheduler" should be a part of Process queue as well.
So if there are 5 process are there in Process queue & process scheduler is administrating them then since its also a process, once it puts a process under RUN state it should itself go inside queue because at one instant only one process can get executed on a processor. This is quite confusing for me. Please help me out. I tried to search on this but could not find any relevant topics.