hi all
i have a program in C (Unix Solaris 5.7) and i want to read a string from keyboard, but the "scanf" doesn´t reads spaces.
example:
....
char name;
....
printf("Enter your name: ");
scanf("%s",&name);
printf ("Your name is: %s", name);
and if i write Kevin Costner ... (4 Replies)
I would like to write shell/perl script which identifies the top unix processes that are performing high disk I/O's or/and writes
If any one knows the solution please help me?
-Swamy (0 Replies)
Guys,
Is there any UNIX command that captures the 'Unix process which is performing high disk I/O reads and writes'.
can you help me in this?
-Swamy (6 Replies)
Hi,
I am trying to find the reliability of 'vmstat -d' for showing the actual physical writes on sectors on hard disk.
Can anyone please tell me if the numbers in the "sectors" field under "read" or "write" headers show a count of the actual write commands sent to disk from the low level... (2 Replies)
After I using the search tool, I still can't find a solution that was related with my trouble.
My input file:
@HWI-ABC123_30DFGGDA:1:100:3:1234
ACGTAGTACCCGGGTTTTTTTTTAAAAAAA
+HWI-ABC123_30DFGGDA:1:100:3:1234
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
@HWI-ABC555_30DFGGDA:1:100:3:1234... (14 Replies)
Hi,
I am in need of help on reading through a file(servernames.dat) which has a list of server names, while it reads each file name it has to connect to that server and run another script, once it has executed the script on one server, it has to go back to the list of servernames to get the next... (5 Replies)
I'm trying to performance tune the I/O of my web server, which is at 41.1% reads merged (If my math is correct), which seems a tad high to just be going along with the defaults. Will modifying read_ahead_kb affect the value of "reads merged" in diskstats? If not, what's a good way of tracking... (2 Replies)
Hey guys,
Does anyone know how to calculate total number of mapped reads for a certain region of a bam file using samtools flagstat?
I know to use flagstat for the whole bam file. but for a specific region of it... is there an option?
Tnx
---------- Post updated at 12:27 PM ----------... (1 Reply)
cleanwork /saswork removes sas orphanded processes in the saswork directory. Subdirectories under sasem are sas94, sas92 and sasworks .
I am getting the following error messages:
1.
'/usr/bin/sudo -S apt-get update <~/opt/SiM/pos/ps/db_auth.cfg... (4 Replies)
I have below script to read a file line by line. How can I ensure that the loop will stop after last line.
#!/bin/bash
while read -r mod ver tarball; do
echo $mod
done < taskfile.txt (4 Replies)
Discussion started by: aderamos12
4 Replies
LEARN ABOUT SUSE
sg_raw
SG_RAW(8) SG3_UTILS SG_RAW(8)NAME
sg_raw - sends an arbitrary SCSI command (with an optional data phase) to a device
SYNOPSIS
sg_raw [OPTIONS] DEVICE CDB0 CDB1 ...
DESCRIPTION
This utility sends an arbitrary SCSI command (between 6 and 16 bytes) to the DEVICE. For the optional data phase, data can either be read
from a file and sent to the DEVICE or received from the DEVICE and then displayed or written to a file.
The SCSI command may be between 6 and 16 bytes long. Each command byte is specified in plain hex format (00..FF) without a prefix or suf-
fix. See EXAMPLES section below.
The commands pass through a generic SCSI interface which is implemented for several operating systems including Linux, FreeBSD and Windows.
OPTIONS
Arguments to long options are mandatory for short options as well.
-b, --binary
Dump data in binary form, even when writing to stdout.
-h, --help
Display usage information and exit.
-i, --infile=IFILE
Read data from IFILE instead of stdin. This option is ignored if --send is not specified.
-k, --skip=LEN
Skip the first LEN bytes of the input file or stream. This option is ignored if --send is not specified.
-n, --nosense
Don't display SCSI Sense information.
-o, --outfile=OFILE
Write data received from the DEVICE to OFILE. The data is written in binary. By default, data is dumped in hex format to stdout. If
OFILE is '-' then data is dumped in binary to stdout. This option is ignored if --request is not specified.
-r, --request=RLEN
Expect to receive up to RLEN bytes of data from the DEVICE. RLEN may be suffixed with 'k' to use kilobytes (1024 bytes) instead of
bytes. This option and --send are mutually exclusive.
-s, --send=SLEN
Read SLEN bytes of data, either from stdin or from a file, and send them to the DEVICE. This option and --request are mutually
exclusive.
-t, --timeout=SEC
Wait up to SEC seconds for command completion (default: 20). Note that if a command times out the operating system may start by
aborting the command and if that is unsuccessful it may attempt to reset the device.
-v, --verbose
Increase level of verbosity. Can be used multiple times.
-V, --version
Display version and license information and exit.
EXAMPLES
sg_raw /dev/scd0 1b 00 00 00 02 00
Eject the medium in CD drive /dev/scd0.
sg_raw -r 1k /dev/sg0 12 00 00 00 60 00
Perform an INQUIRY on /dev/sg0 and dump the response data (up to 1024 bytes) to stdout.
sg_raw -s 512 -i i512.bin /dev/sda 3b 02 00 00 00 00 00 02 00 00
Showing an example of writing 512 bytes to a sector on a disk is a little dangerous. Instead this example will read i512.bin
(assumed to be 512 bytes long) and use the SCSI WRITE BUFFER command to send it to the "data" buffer (that is mode 2). This is a
safe operation.
sg_raw -r 512 -o o512.bin /dev/sda 3c 02 00 00 00 00 00 02 00 00
This will use the SCSI READ BUFFER command to read 512 bytes from the "data" buffer (i.e. mode 2) then write it to the o512.bin
file. When used in conjunction with the previous example, if both commands work then 'cmp i512.bin o512.bin' should show a match.
EXIT STATUS
The exit status of sg_raw is 0 when it is successful. Otherwise see the sg3_utils(8) man page.
AUTHOR
Written by Ingo van Lil
REPORTING BUGS
Report bugs to <inguin at gmx dot de>.
COPYRIGHT
Copyright (C) 2001-2008 Ingo van Lil
This software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR-
POSE.
SEE ALSO
sg_opcodes sg_vpd(sg3_utils), hdparm(hdparm), sgdiag(scsirastools)
sg3_utils-1.26 May 2008 SG_RAW(8)