Sponsored Content
Top Forums UNIX for Advanced & Expert Users What process is writing to disk? Post 302252683 by radoulov on Thursday 30th of October 2008 05:43:20 AM
Old 10-30-2008
I would definitely try to trace the rest of the processes one by one (not exactly, here I'm tracing the mysqld process and follow the forks).
Something like this:

Code:
strace -Tfe pwrite64 -p <pid>

Code:
# strace -Tfe pwrite64 -p 2158
Process 32381 attached with 19 threads - interrupt to quit
[pid 32381] pwrite64(10, "\200>u\327\0\364\0\21\0\0\336\0178^\202\\\37&\0\201\307\0\2\0\2\200\4\200\0048\333\2"..., 512, 4721664) = 512 <0.000042>
[pid 32381] pwrite64(10, "\200>u\327\1\324\0\21\0\0\336\0178^\202\\\37&\0\201\307\0\2\0\2\200\4\200\0048\333\2"..., 512, 4721664) = 512 <0.000021>
[pid 32381] pwrite64(10, "\200>u\327\2\0\0\21\0\0\336\0178^\202\\\37&\0\201\307\0\2\0\2\200\4\200\0048\333\2"..., 1024, 4721664) = 1024 <0.000022>
[pid  2170] pwrite64(4, "\22\177\266\324\0\0\0007\377\377\377\377\377\377\377\377\0\0\0\0|\353\254\364\0\2\0\0\0\0\0\0"..., 81920, 1048576) = 81920 <0.000117>
[pid  2164] pwrite64(4, "2`\32e\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0|\353\256\303\0\0\0\0\0\0\0\0"..., 32768, 81920) = 32768 <0.000095>
[pid  2164] pwrite64(4, "\22\177\266\324\0\0\0007\377\377\377\377\377\377\377\377\0\0\0\0|\353\254\364\0\2\0\0\0\0\0\0"..., 16384, 901120) = 16384 <0.000073>
[pid  2164] pwrite64(4, "Fd7\370\0\0\r{\377\377\377\377\377\377\377\377\0\0\0\0|\353\256YE\277\0\0\0\0\0\0"..., 16384, 56541184) = 16384 <0.000067>
[pid  2164] pwrite64(4, "\247\30\243\257\0\0\25\340\0\0\24\34\0\0\24:\0\0\0\0|\353\256\303\0\2\0\0\0\0\0\0"..., 16384, 91750400) = 16384 <0.000067>
[pid  2162] pwrite64(9, "\0\0\0\0\0\0\336\17\0\0\0\0|\353\256\303\0\230\16\303\0\20\0\0\377\377\377\377\377\377\377\377"..., 512, 1536) = 512 <0.000070>

Or use -c to count write system calls.

This should show the write intensive processes.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Writing file to disk takes time

Hi All, I am working on a Solaris machine. When i use a particular software to generate some files, the log shows around 0 to 3 secs for generating each file. But the same when i see on the disk it shows double the time difference between two file generation. For example if file A takes 0 secs... (7 Replies)
Discussion started by: nileshkarania
7 Replies

2. UNIX for Advanced & Expert Users

disk i/o per process

Dear All, We are using AIX 5.2 with IBM pseries servers. I want to check disk io for a running process. Please if anybody can help me. Thanks. Aqeel Anwar (1 Reply)
Discussion started by: aqeelcu@hotmail
1 Replies

3. AIX

disk i/o per process on aix 5.2

hi, i am working on aix 5.2, i want to check disk i/o for any running process. please if anybody can help me. thanks Aqeel Anwar (1 Reply)
Discussion started by: system-admin
1 Replies

4. Shell Programming and Scripting

Which Process is writing this Log file!!

Hello , Well I have some /tmp files which are growing very quickly..Can anyone suggest me a way to find which process is logging into this file :confused: ? Thanks very much in Advance!! Mohammed (2 Replies)
Discussion started by: Mohammed
2 Replies

5. UNIX for Dummies Questions & Answers

Which process is doing all the writing

Hi We are running an IBM P570 with AIX and Unidata. The disk monitor in nmon is showing that one of our logical volumes is hitting 100% most of the time, and that 98% of it is write. I am trying to identify the top processes in terms of disk IO, obviously particularly write so that we... (4 Replies)
Discussion started by: idwalton72
4 Replies

6. Linux

How to follow up disk mirroring process?

Hi, The OS is SuSE Enterprise 11 and the system is HP WS460c G6 Blade with hardware disk array RAID 1 mirror. One disk was just replaced and the disk mirroring process is on its way. My question is how to follow up / monitor the disk mirroring process? I know hpacucli can do the job, but there... (0 Replies)
Discussion started by: aixlover
0 Replies

7. UNIX for Dummies Questions & Answers

Writing a loop to process multiple input files by a shell script

I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files: for i in 250.*; do || awk... (4 Replies)
Discussion started by: evelibertine
4 Replies

8. Ubuntu

Reading disk usage per process

Hi, I am using iostat and /proc/<pid>/status to determine the disk usage per process. I have a question regarding buffer cache. When I am reading a 10MB file, the counters I get show that <5MB of the file is read. Do the counters in iostat and /proc/<pid> reflect the amount of data that is... (2 Replies)
Discussion started by: fidelity
2 Replies

9. Emergency UNIX and Linux Support

How to find which process using, while getting High Disk I/O?

In Our Production server I/O was very high, I Recived mail that Disk I/O was high, is it possible how to find which process Used this much I/O ? Iam Using Ubuntu server 12.04. Linux 3.9.3-x86_64-server33 (Li473-1200) 07/23/2014 _x86_64_ (8 CPU) 12:05:01 AM DEV ... (5 Replies)
Discussion started by: babinlonston
5 Replies

10. Open Source

Help with writing Shell Script to automate process using multiple commands

Hello! Need help to write a Linux script that can be run from windows using command/Cygwin/any other way. I am new to scripting, actually i am trying to automate server health check like free disk space, memory along with few services status, if any services is not running then start services ,... (7 Replies)
Discussion started by: Sayed Ibrahim
7 Replies
plimit(1)							   User Commands							 plimit(1)

NAME
plimit - get or set the resource limits of running processes SYNOPSIS
plimit [-km] pid... plimit {-cdfnstv} soft,hard... pid... DESCRIPTION
If one or more of the cdfnstv options is specified, plimit sets the soft (current) limit and/or the hard (maximum) limit of the indicated resource(s) in the processes identified by the process-ID list, pid. Otherwise plimit reports the resource limits of the processes identi- fied by the process-ID list, pid. Only the owner of a process or the super-user is permitted either to get or to set the resource limits of a process. Only the super-user can increase the hard limit. OPTIONS
The following options are supported: -k On output, show file sizes in kilobytes (1024 bytes) rather than in 512-byte blocks. -m On output, show file and memory sizes in megabytes (1024*1024 bytes). The remainder of the options are used to change specified resource limits. They each accept an argument of the form: soft,hard where soft specifies the soft (current) limit and hard specifies the hard (maximum) limit. If the hard limit is not specified, the comma may be omitted. If the soft limit is an empty string, only the hard limit is set. Each limit is either the literal string unlimited, or a number, with an optional scaling factor, as follows: nk n kilobytes nm n megabytes (minutes for CPU time) nh n hours (for CPU time only) mm:ss minutes and seconds (for CPU time only) The soft limit cannot exceed the hard limit. -c soft,hard Set core file size limits (default unit is 512-byte blocks). -d soft,hard Set data segment (heap) size limits (default unit is kilobytes). -f soft,hard Set file size limits (default unit is 512-byte blocks). -n soft,hard Set file descriptor limits (no default unit). -s soft,hard Set stack segment size limits (default unit is kilobytes). -t soft,hard Set CPU time limits (default unit is seconds). -v soft,hard Set virtual memory size limits (default unit is kilobytes). OPERANDS
The following operands are supported. pid Process ID list. EXIT STATUS
plimit returns the exit value zero on success, non-zero on failure (such as no such process, permission denied, or invalid option). FILES
/proc/pid/* process information and control files ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ SEE ALSO
ulimit(1), proc(1), getrlimit(2), setrlimit(2), proc(4), attributes(5), SunOS 5.10 8 Jun 1998 plimit(1)
All times are GMT -4. The time now is 05:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy