All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
1answer
34 views

Reading data from serial port

FYI I am running busybox. I am able to send data to my ttyS1 using the following command: stty -F /dev/ttyS1 speed 115200 cs8 -cstopb -parenb -echo echo -en 'data here' > /dev/ttyS1 But when I ...
1
vote
2answers
39 views

If I know how many lines to go down, how do I know where to start in the file in terms of bytes

I want start read()'ing a file at a certain position. I know how many lines to start reading at - but read() doesn't take lines as an argument, it takes bytes for position. Is there some trick I can ...
1
vote
2answers
39 views

Read list of servers for user?

How can i read list of server entered by user & save it into variable ? Example: Please enter list of server: (user will enter following:) abc def ghi END $echo $variable abc def ghi I want ...
2
votes
0answers
79 views

Linux AHCI/ATA read errors not reported

After a recent OS upgrade (to current Tumbleweed, Linux Kernel 4.16.0 from April 4th), when reading from a faulty hard disk or from damaged/scratched DVDs, I don't get anymore read errors in the ...
1
vote
1answer
436 views

Simulating slow down of disk operations

we know that there exist some excellent tool like netem which make it possible to slow down network parameters (like bandtwidth and so on). Is there exists analogous tool for simulating slow down ...
1
vote
0answers
656 views

High iowait while the throughput and IOPS are low

I'm new to programming & Linux. After I finished my programs(do some IO), I found iowait is very high(~65%) while the throughput(~5M/s read + ~5M/s write) and IOPS(50~100 QPS) are low. iostat -...
1
vote
1answer
2k views

Read speed from a mounted directory

An application is loaded by mounting its content from a distant machine to a local dir. On some machines there is slow performance and I'd like to check the read speed of the files in the mounted dir. ...
0
votes
2answers
89 views

check log file if job status is not started

I would like to create Linux shell script which reads a log file. for eg. I have log file with lines: Job: One(106) started. Job: Two(107) started. Job: Name(111) started. Job: EXE(112) started. Job:...
0
votes
3answers
601 views

How to get the number of words given as input in a “read” command?

For the following command, how to know, how many words are given in the input? $ read text I would like to take a new variable which will count the number of words given input to "text". As for ...
19
votes
4answers
1k views

Why some shells `read` builtin fail to read the whole line from file in `/proc`?

In some Bourne-like shells, the read builtin can not read the whole line from file in /proc (the command below should be run in zsh, replace $=shell with $shell with other shells): $ for shell in ...
1
vote
1answer
485 views

How to read from another terminal?

I opened two terminals (/dev/pts/1 and /dev/pts/2) and started my application from /dev/pts/1. I want to read in real time from /dev/pts/2 but my code doesn't work: actually some of the symbols are ...
1
vote
0answers
36 views

Bash one liner not looping [duplicate]

I am trying to loop through a file to run commands remotely via SSH but its only sending the first command and stopping. while read a b c; do ssh root@$remoteserverip "/usr/bin/mysql -e \"grant all ...
31
votes
1answer
107k views

How to get total read and total write IOPS in Linux?

How do I get read and write IOPS separately in Linux, using command line or in a programmatic way? I have installed sysstat package. Please tell me how do I calculate these separately using sysstat ...
1
vote
2answers
304 views

How to decrease the time the processes would wait (blocked) for disk reads (only to discover an error)?

Waiting too long when encountering an unreadable sector on a disk is really very annoying. (Especially if you are trying to read as much data as can be read from a disk with bad sectors, and do it ...
3
votes
3answers
725 views

In what shared library is read()?

I want to know where the system call read() is. Which shared library is linked when I call read()?