I/O is an acronym for Input/Output, which refers to the mechanism or process for the transfer of information between one system or component and another.

learn more… | top users | synonyms

35
votes
5answers
3k views

Redirecting stdout to a file you don't have write permission on

When you attempt to modify a file without having write permissions on it, you get an error: > touch /tmp/foo && sudo chown root /tmp/foo > echo test > /tmp/foo zsh: permission ...
18
votes
2answers
3k views

When is dd suitable for copying data? (or, when are read() and write() partial)

Short version: In what circumstances is dd safe to use for copying data, safe meaning that there is no risk of corruption due to a partial read or write? Long version — preamble: dd is often used to ...
13
votes
3answers
935 views

Determining Specific File Responsible for High I/O

This is a simple problem but the first time I've ever had to actually fix it: finding which specific files/inodes are the targets of the most I/O. I'd like to be able to get a general system overview, ...
14
votes
2answers
2k views

Measure pipe throughput in the shell

There is a shell command that allows to measure how fast the data goes through it, so you can measure the speed of output of commands in a pipe. So instead of: $ somecommand | anothercommand you ...
12
votes
5answers
28k views

How can I read line by line from a variable in bash?

I have a variable which contains multiline output of a command. What's the most effecient way to read the output line by line from the variable? For example: jobs="$(jobs)" if [ "$jobs" ]; then ...
1
vote
1answer
357 views

-bash: /usr/sbin/useradd: Input/output error — What does this mean?

Today, on my Centos server I tried to add a user but got the following error: -bash: /usr/sbin/useradd: Input/output error How do I fix it?
21
votes
3answers
684 views

How can I limit the output speed of stdout?

I'm running CentOS 5.7 and I have a backup utility that has the option of dumping its backup file to stdout. The backup file is rather large (multiple gigabytes). The target is an SSHFS filesystem. To ...
9
votes
1answer
1k views

What's the progress regarding improving system performance/responsiveness during high disk I/O?

Whenever there is high disk I/O, the system tends to be much slower and less responsive than usual. What's the progress on Linux kernel regarding this? Is this problem actively being worked on?
25
votes
12answers
2k views

How can I tweak my Linux desktop to be more responsive?

I have the experience that Linux works fine until the physical memory is exhausted. As soon as swap space is used the performance is severely degraded and the GUI becomes unresponsive. This problem ...
22
votes
5answers
2k views

Why is iterating over a file twice faster than reading it into memory and computing twice?

I'm comparing the following tail -n 1000000 stdout.log | grep '"success": true' | wc -l tail -n 1000000 stdout.log | grep '"success": false' | wc -l with the following log=$(tail -n 1000000 ...
3
votes
1answer
136 views

What is the difference between > and >> (especially as it relates to use with the cat program)?

Suppose that I have a file called temp.txt. Using the cat program, I would like to add the contents of this file to the end of myfile.txt -- creating myfile.txt if it does not exist and appending to ...
8
votes
2answers
1k views

Heavy write activity on SSD nukes system performance

I've noticed that when I do heavy write applications, the whole system slows down. To test this further I ran this to do a (relatively) low-CPU, high disk activity: john -incremental > file_on_SSD ...
7
votes
3answers
2k views

How can I monitor disk I/O in a particular directory?

I've got a few processes with a known name that all write to files in a single directory. I'd like to log the number of disk block reads and writes over a period (not just file access) to test whether ...
4
votes
2answers
95 views

why does blktrace only write blocks of 8?

I want to understand the I/O pattern a database is writing to disk to decide how many disks to use for best performance. To analyse the I/O pattern I want to use blktrace and I have to grok it first. ...
4
votes
0answers
159 views

Repeatably generate a read error for testing? [duplicate]

I'm trying to test the error handling in some software, in particular what happens when an error occurs reading from a file or pipe. Is there a simple way to send a certain amount of data to stdout ...
4
votes
5answers
375 views

performance monitoring

Is there some performace monitoring tool which would run in background gathering info about all system activity? Somethimes my system (Arch linux, 32 bit) slows down terribly and the top utility ...
1
vote
3answers
146 views

Amazon EC2 micro instance large number of IO requests

I'm trying to understand why I have a huge number of EBS IO request on my Amazon EC2 micro instance. I launched the instance roughly 6 days ago and has racked up over 4 million IO requests so far. ...
11
votes
1answer
521 views

How do I go about tracking down IO usage in Linux and other *nix OS'?

Occasionally, something on my system starts hammering the disk. I would like to log data that would let me know about I/O usage per process, then I could go back to it later and see what keeps doing ...
6
votes
2answers
346 views

Mysterious write IO

I am just reviewing the disk IO of a XEN VM server. I stumbled across a DomU that has constant write traffic. To narrow that traffic further down I logged in to the DomU (CentOS 5, 64 Bit) and ...
4
votes
2answers
2k views

100.0%sy with poor disk performance

I have RHEL 5.4 kernel 2.6.18-164.el5 and I am experiencing very bad disk performance that happens randomly during working with Oracle. Nothing appears in the logs. When it happens, I see one CPU ...
3
votes
3answers
542 views

Special File that causes I/O error

I want to automatically test if a piece of software reacts as expected if an essential SQLite DB file fails to be read (causing an I/O error). Exactly that happened some days ago at a client. We ...
2
votes
2answers
290 views

iotop but for particular disk?

Is there a tool like iotop but for monitoring IO on specific volumes? (Or perhaps I missed a way to filter iotop?) If not is there any way to get at this information via (say)/proc? (dstat etc. ...
2
votes
1answer
256 views

How race conditions affect reads and writes (that happen at the same time)

Let's say I open a file a for reading. What if an application, let's call it aWriter writes to this file in random intervals. Are there any possibilities of me receiving improper file contents if I ...
1
vote
2answers
510 views

How to know recently updated files

If I run iostat -x 1 I saw ocassionally large 5MB to 10MB writes. What files are being written? I want to check the recently created files with size over 5MB for example. How would I do so?
1
vote
1answer
251 views

performance on Linux system when daisy-chaining multiple USB hard-drives on USB hubs?

What would the I/O access be like as I plug many USB drives into a Linux system with only 2 USB 2.0 ports and 1 USB 3.0 port? I expect I will have to have multiple levels of fan-out by plugging hubs ...
0
votes
0answers
61 views

Is swapping the cause of high IO on my box?

I'm running a LAMP stack on an Amazon EC2 micro instance with 616 MB of memory. This seems sufficient to be able to run a few small websites with Apache, MySQL and PHP. I have one Wordpress site ...
0
votes
1answer
306 views

Does linux have something like supercache?

I installed http://www.superspeed.com/desktop/supercache.php for windows and the result is awesome. Every program I run is faster. Basically it uses the memory to cache data. Simple idea. I also use ...
0
votes
1answer
133 views

What Linux tool will tell me if all the mounted disks share roughly the same bandwidth?

What Linux tool will tell me if all the mounted disks share roughly the same bandwidth? Can I do something like iostat for each of my /dev/sd* devices?