Ubuntu :: Obtain The User That Owns The Process From /proc/process_id?

May 29, 2010

How can I obtain the user that owns the process from /proc/process_id? Is it the Uid in /proc/process_id/status ? If so why are there 4 values there?

View 2 Replies


ADVERTISEMENT

General :: Always Create Files/folders But Only Write To Those The User Owns?

Aug 14, 2011

I need 2 Linux users to share a folder. Within this folder, users should always be able to create files and sub-folders and write into any sub-folder (whether they own it or not). However, they should only be able to edit the files they actually own.

View 1 Replies View Related

General :: How To CPU Usage Of Process From / Proc?

Jul 15, 2011

I am currently writing a JAVA script to monitor certain unix processes through JConsole. Upon having lots of trouble with runtime.exec, i decided to bypass the top/ps command call and just get the information straight from /proc/*pid*/whatever.Now i can pull back any information from any of the files I want, and the current way i determine the CPU usage of a process is as follows:

Add the UTime and STime of that process from /proc/pid/stat then divide my pidCpu by UTime + STime + NTime from /proc/stat, then multiply that by 100, should give me the % cpu usage a process is using, right?Theory being if I get the jiffies assigned to my process, I can divide that by the total jiffies the cpu assigns. However, my results seem to vary from the ones gathered from top and ps. What am I doing wrong?

View 3 Replies View Related

General :: Java Process Without Memory Detail In Proc File System?

May 13, 2010

To get the kernel messages of new java process, i refer the details from /proc/<java pid>/stat and /proc/<java pid>/statm files. For some java processes, I didn't find any details in the /proc/<java pid>/statm file. It has only 7 number of 0s. But /proc/<java pid>/stat file has the details. And also this kind of process will have the life time of nearly 1 minute.

Kernel version using: Linux-2.6.18-8.1.8.el5 Is there any possibility of java process without the memory details in the /proc/<java pid>/statm file? If it is possible, how to know the memory related details of that processes?

View 1 Replies View Related

General :: Obtain Local User Accounts Remotely?

Aug 17, 2010

I am trying to figure out a way to pull the user information from local users on a Linux server. I have approximately 40 servers running SUSE and Ubuntu that are using Microsoft Active Directory in order to authenticate. Our internal auditing group has made us disable root ssh ability, I was doing this with clusterssh, but I can login as me then su on the server to conduct root, admin, work. This is an ongoing request to get the local users and it is a painfully slow process since I have to login to each server to get the /etc/passwd file. Is there another way to get the local user information? They are now asking about seeing the last logon date or if the account is disabled, any thoughts there as well?Most of our auditors think Windows and I am trying to make my life easier but not sure what options I have. I need to get local accounts and if they are active or disabled plus last logon date. I'm sure there will be more but if I can get the basics adding more shouldn't be too difficult but I guess I'll cross that bride when I get there.

View 7 Replies View Related

Ubuntu :: New User Crash Boot Up - Missing Modules (cat/proc/madules;is/dev)

Jan 5, 2011

new user and have had a crash boot up and get the following: missing modules (cat/proc/madules;is/dev) Alert! /dev/disk/by-uuid/13bf007d-3bab-48et-b91a-babe68ab3223 does not exist

View 9 Replies View Related

Hardware :: Obtain A Real Memory Address From User Space - Mmap() And /dev/mem

Feb 25, 2010

I'm running an embedded Linux kernel, and I want to obtain a real memory address from user space. After goggeling a little, I found that the only way was to use mmap to access /dev/mem. But I never used mmap. I want to load a program in memory, in order to make it available from another processor, that has access to the DDR, but not to the flash memory where program is stored. Here is the code I use:

Code: // Open file and get its size
FILE* program = fopen(argv[3],"rb");
fseek(program, 0, SEEK_END);
long program_size = ftell(program);
fseek(program, 0, SEEK_SET);
// Prepare memory to copy it in
void* program_address = malloc(program_size+1);
FILE* memory_stream = fmemopen(program_real_address, program_size + 1, "wb");
[Code]....

View 5 Replies View Related

Fedora Installation :: An Error Occurred Mounting Device Proc As /proc: Mount Failed

Jul 6, 2010

I've got the F13 LiveCD that I was able to boot and use using the "nomodeset" boot option. From the desktop I'm trying to perform an Install to Hard Drive. I've read the Install from LiveCD post regarding the creation of a /boot partition and a / root partition. I've tried creating them without the LVM group and with. But every time I appempt to install I get...

An error occurred mounting device proc as /proc: mount failed: (9, None). This is a fatal error and the install cannot continue.

Hardware is a Sager 8887 (P4, 3.06HT, 60GB HDD, Radeon 9000 graphics adapter)

View 7 Replies View Related

Ubuntu Multimedia :: Which Package Owns/maintains /etc/asound.conf

Jul 11, 2010

Which package owns/maintains /etc/asound.conf? I thought it would have been alsa-base, but I uninstalled alsa-base, and the file was still there.

I have a suspicion that I messed with my /etc/asound.conf file and I would like to regenerate it. I was thinking a simple reinstall of the package that owns this file.

View 1 Replies View Related

General :: How To Know Which Logical Volume Owns A File

Jul 14, 2010

Hi. We have a cluster consisting of 10 logical volumes all part of one filesystem. Is there a way to know which logical volume owns a certain file/inode? I have tried what is suggested at this link, but the output is the filesystem and not a specific logical volume.

View 6 Replies View Related

Software :: Know Name Of File Which Owns A Block Number On FS?

Apr 24, 2010

I need to monitor file reads&writes by all the apps. I have found a kernel feature /proc/sys/vm/block_dump. But it only gives me block numbers while i would like to know file names. How can i convert these block numbers to file names (if the blocks belong to a file, of course)?

View 3 Replies View Related

Software :: Change A Process Running In Root-user To Non-root User ?

Oct 28, 2009

Is It possible to change a process running in root-user to non-root-user by setting suid / uid / euid / gid etc... I so please instruct how, when and wat to set in order to change a process running in root-user to non-root user

View 4 Replies View Related

Ubuntu :: How To Export Per-user Process Variables

Mar 15, 2010

I can't seem to find how to export a variable to all processes I run under my user? I have an application that needs this variable, and currently I have to manually export this variable (typing "export VAR=... in terminal) every time before I run the application.

Which profile file I have to put the export expression into? I want all processes to inherit this variable, not just the shell/terminal. I.e. a true environment variable...

View 7 Replies View Related

Ubuntu Servers :: Www-data Run Process As Different User?

Jun 23, 2010

forums so I'm not sure this is the right place for this topic.So, my question/topic thing is:I have a PHP script that runs on an apache2 web server (www-data).From this script, i want to launch a process that stays alive all the time,ut the parent script keeps on going. So I think I will need to run a command like 'at' to put the process on a queue, and the script can continue and finish, without waiting for the process to stop. But it seems like I will need to run the 'at' command as a different user, because www-data stops the 'atd' process. I'm not sure about that. Does anybody know how this could happen?

View 2 Replies View Related

Ubuntu :: Running A Process Indefinitely As An User?

Feb 27, 2011

i am using Ubuntu 10.04.1 LTS. i only ever contact my ubuntu machine through SSH. everytime i login, i do:

~/downloads/.dropbox-dist/dropboxd &

this launches the dropbox process and all is great. except when i log back into the ubuntu machine via ssh after a few hours, the process no longer exists. how can i get the process to run indefinitely?

View 4 Replies View Related

Ubuntu Networking :: Log Traffic By User (or By Process)?

Jun 9, 2011

Does anybody know a way to log traffic on a single interface/IP by process? Specifically what I want to record is traffic usage by user, but I can match PIDs against user to product stats and the user would also be in the full command line of the process.

There is a nice tool called nethogs that I often use to monitor traffic this way in realtime, but I would like to log the accumulated traffic rather than just monitor it.

View 1 Replies View Related

General :: Process Name Same As Of User

Jan 12, 2010

I list the process with

Code:
ps -ef | grep java
and I got:

Code:
user1 24041 ....
Here the user1 should the process name.

My question: Is this name the same as the user name?

View 2 Replies View Related

General :: Make A Process That Can Be Kill By All User?

Feb 24, 2010

I've three user in my machine ,and i want to make sure that the process created by the user1 can be killed by other user and vice-versa ,is there any way i can do that without using root password or sudo

View 4 Replies View Related

Ubuntu :: Phantom User Still Logged In - Bash: Kill: (5485) - No Such Process

Sep 13, 2010

$ uptime
09:55:00 up 7 days, 6 min, 2 users, load average: 0.00, 0.00, 0.00

..but I'm the only user logged in!

$ who -a
system boot 2010-09-06 09:48
run-level 2 2010-09-06 09:48 last=

[code]....

looks as though this is the culprit, but...

$ kill 5485
-bash: kill: (5485) - No such process

This process doesn't exist in the /proc folder or the output of ps. Does anyone know how this happened, and how to remove this ghost user from my system without a complete reboot? I think I have seen a similar thing on a RedHat machine ages ago but I have never figured out how to log out these ghost users.

$ uname -a

Linux ubuntu 2.6.24-28-server #1 SMP Wed Aug 25 16:07:16 UTC 2010 i686 GNU/Linux

View 9 Replies View Related

General :: Setuid Process Cannot See Processes Owned By That User

Nov 2, 2010

I would like to give a non-root user (nicollet) the ability to detect and send a signal to processes started by Apache2 (those processes are FastCGI scripts and the signal tells them to empty their cache). The processes are owned by the web user (www-data), and I'm running on Debian unstable.

I can't find any way to have the nicollet user see those processes.

The processes are running and can see by both root and www-data:

root@linux-01:~# ps -Af | grep baryton
www-data 17649 17648 0 10:27 ? 00:00:00 baryton
www-data 28145 1 0 Nov01 ? 00:00:12 baryton --bot
root 18701 18700 0 10:46 pts/0 00:00:00 grep baryton
root@linux-01:~#

[Code]....

The most surprising is that the grep process is indeed run by www-data (because it's started from a setuid executable) and is visible, but the baryton process isn't.

What's going on here? Why can ps run by www-data show those processes, but ps run by a setuid executable running as www-data cannot, when it's started by nicollet?

View 1 Replies View Related

General :: Write A Log File Of A User Interactive Process Using Tee ?

Sep 30, 2010

I want to write the sequence of operation of a user interactive process (Question asked by the process and answers user entered) in to a log file.

I used tee command, Precess1 | tee -a FileName

This write only the Question asked by the process. Does anybody know how to write the user inputs also to the same file, synchronized?

View 2 Replies View Related

General :: Set Umask For Process Running Root User?

Nov 23, 2009

I am trying to set the umask for a process(orkaudio) which is running as the root user.This program creates dir and files and I need the umask to be 022. I have edited my /etc/bashrc -- and when i type in umask i get 0022 --- Not sure how to go about getting this resolved...

View 1 Replies View Related

Debian :: Kill An Process Running From An Folder And With User Parameter?

Dec 4, 2010

i googled around and finally stumbled over this forum. I've been wondering, how would i kill an process running from an folder and with user parameter? I usually type this into the ssh console: pkill -9 < process > -U < username >

But i want users be able to run it multiple times, and killing only an specific process and not every single one.

View 4 Replies View Related

General :: Kill Process Started With Different User Without Being Root / Sudoer?

May 3, 2010

I need to kill a process which has been started by user2 if I am user1 without being sudoers or using root.Do you know if there is a way of setting that when launching the process? Such as a list of users allowed to kill the process?

View 7 Replies View Related

General :: Give Permission To Execute Process As Super User?

Jul 27, 2010

I have a program(that is written by me) which need super user permission to execute it. But I need to let the normal users to execute it without using 'sudo ./executable' and just './executable'. how i can set the program to execute by the normal users without using 'sudo' or password prompting.

View 2 Replies View Related

General :: Process Control From Boot Loader To User Space

Jun 29, 2010

For the past few days I was putting effort on understanding the software control flow starting from "Boot loader" to "Linux User space".

I am consolidating the entire process and putting forth in this forum...It would be great if someone can validate this..It might be useful to other new bees too.

Step 1 : Power up the board

Step 2 : The CPU control goes to EEPROM/storage memory where BIOS resides

Step 3: BIOS gets loaded in RAM and gets executed

Step 4: During execution, the selection of Boot device has to be done with the help of BIOS Menu [Blue screen appearance during start up in normal PC's]

Step 5: BIOS shall access the Bootloader stored in boot device [for eg.,Hard disk]. Boot loader is stored in MBR area.

for explanation purpose I take the following configurations

Bootloader = GRUB
Boot Device = Hard Disk

Step 6: GRUB shall be loaded in RAM and gets executed

Step 7: GRUB shall load the KERNEL image to RAM. Kernel image is stored in Hard Disk.

The question of "How the GRUB knows where the Kernel image is stored".

The answer is
1. In the "Grub.config" file, the location of "Kernel Image" and " Ramdisk Image" [which will be discussed later in the section] is being given.

Step 8: Kernel Image followed by Ramdisk Image is loaded in RAM by GRUB bootloader

Step 9: Kernel Image gets executed...During execution, top portion of the code shall make initial hardware initialization and latter part
of the code shall just decompress the Kernel Image

Step 10 : After decompressing the Kernel Image, it shall decompress
the already loaded Ramdisk Image

Ram disk is just creating a temporary hard disk in RAM. The main responsibility includes it consists of minimal driver files, executables, directory structures to created a TEMPORARY ROOT FILE SYSTEM.

This Temporary Root File system shall be used by Kernel Image

1. Execute the executables to access the Hard disk
2. For creating Permanent Root File System in HARD DISK

Step 11 : Kernel Shall look for the file /Linuxrc in Ramdisk. Linuxrc
is a USER script file [not sure]

Step 12: At the end of script file Linuxrc, the Ramdisk shall give the
control to "USER SPACE" [path for writing the script not known]in Linux kernel

Step 13: USER SPACE is the normal shell

View 2 Replies View Related

Software :: Bash-script : Start A User A's Process From Other Users?

Aug 26, 2010

A Tomcat server is installed under user A. Now I am going to write a script which will start this Tomcat server. And this script can be executed from other users (from there account). And if other user run this script, the process ID should be of user A, so that user A can start or stop this process any time. This means, at the beginning of the script I have set the process ID as user A. How to do this?

View 8 Replies View Related

Programming :: Make A (user Space )process Pre Emptive / In 2.6 Kernel?

Dec 10, 2008

I am writing a program which i dont want the kernel scheduler to preempt before certain time duration. I am using the system call sched_get_priority_max to set the maximum priority. However it is not producing results.

View 3 Replies View Related

Ubuntu Servers :: Access Denied For User 'root'@'localhost' / Set The Password During Installation Process?

Dec 14, 2010

I have installed mysql-server, but i have no access. I have set the password during installation process.

Used command:
mysql -u root -p
error message:

[code]....

View 8 Replies View Related

Ubuntu Installation :: Error - (process:325): GLib-WARNING **: Getpwuid_r(): Failed Due To Unknown User Id (0)

Apr 14, 2011

"(process:325): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (0)"

It comes after choosing language, when the Ubuntu start-up logo shows with the 5 dut under it. I am trying to install Ubuntu Netbook on a little Compaq Mini.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved