Sponsored Content
Top Forums Shell Programming and Scripting hdparm + Inappropriate ioctl for device Post 302297601 by amio on Saturday 14th of March 2009 02:06:30 AM
Old 03-14-2009
Question hdparm + Inappropriate ioctl for device

Hi All,

Am finding performance of my SD card using hdparm.

Code:
hdparm -tT /dev/BlockDev0

/dev/BlockDev0:
Timing cached reads: 1118 MB in 2.00 seconds = 558.61 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate
ioctl for device
Timing buffered disk reads: 14 MB in 3.13 seconds = 4.47 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate
ioctl for device
Am not aware of "HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device". What actually makes it to occur?? What does this problem mean? How to resolve it??

Thanks in advance.
Amio
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Inappropriate ioctl for device

Hi, We are running a perl script to upload some data using SQL* Loader. We pipe the data in a http request to SQL*Loader which loads the data to the database. We encounter the error "Inappropirate ioctl for device" when we try to upload huge data. Any solution would be greatly appreciated.... (4 Replies)
Discussion started by: tojaiganesh
4 Replies

2. UNIX for Dummies Questions & Answers

Inappropriate ioctl for device

When I try to format a slice in Solaris 10 I get the follow error :confused: : -bash-3.00# mkfs /dev/dsk/c1d0s5 18877824 Can not determine partition size: Inappropriate ioctl for device Some format command output:.... AVAILABLE DISK SELECTIONS: 0. c1d0 <DEFAULT cyl 38735 alt 2... (0 Replies)
Discussion started by: spoonman
0 Replies

3. UNIX for Dummies Questions & Answers

Inappropriate ioctl for device

Hello, I have a cron entry: 59 23 * * * . $HOME/.profile;mydate=`date '+%Y%m%d'`;mv filename filename_$mydate Which works fine interactively, but gives me the following error when it runs in cron: Your "cron" job on servername . $HOME/.profile;mydate=`date '+ produced the... (4 Replies)
Discussion started by: steelrose
4 Replies

4. Solaris

Inappropriate ioctl for device, format error

When I try to format a slice in Solaris 10 I get the follow error : -bash-3.00# mkfs /dev/dsk/c1d0s5 18877824 Can not determine partition size: Inappropriate ioctl for device Some format command output:.... AVAILABLE DISK SELECTIONS: 0. c1d0 <DEFAULT cyl 38735 alt 2 hd 64 sec 63>... (2 Replies)
Discussion started by: spoonman
2 Replies

5. Shell Programming and Scripting

Inappropriate ioctl for device

Dear all, Problem goes like this: I have a shell script which when run manually runs perfectly. When same script is executed through a job schdeduler I get an error as Inappropriate ioctl for device and the script fails. This problems seems quite guiling to me. Any clues are heartly... (11 Replies)
Discussion started by: RishiPahuja
11 Replies

6. Filesystems, Disks and Memory

hdparm + HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl

Hi All, Am finding performance of my SD card using hdparm. hdparm -tT /dev/BlockDev0 /dev/BlockDev0: Timing cached reads: 1118 MB in 2.00 seconds = 558.61 MB/sec HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device Timing buffered disk reads: 14... (0 Replies)
Discussion started by: amio
0 Replies

7. Shell Programming and Scripting

tcgetattr: Inappropriate ioctl for device after ssh command

Hello everyone I am finishing a script allowing me to purge logs on multiple servers, i have one last pb with the ssh command.........it is throwing me the following error : tcgetattr: Inappropriate ioctl for device (full screen in attached file 1, full script in attached file 2) It... (15 Replies)
Discussion started by: jimmy75_13
15 Replies

8. UNIX for Advanced & Expert Users

nohup: can't detach from console: Inappropriate ioctl for device

Hi! I am getting a nohup issue on mac osx while trying to start a process through nohup in the startup script. nohup: can't detach from console: Inappropriate ioctl for device Please help! Thanks, Allan. (0 Replies)
Discussion started by: jacki
0 Replies

9. UNIX for Dummies Questions & Answers

Tcgetattr: Inappropriate ioctl for device

Hi, ssh -q -t -l $usr $host bin/test.sh I am using above command to run script remotely. script is working without any issues. but I am getting "tcgetattr: Inappropriate ioctl for device" message on console. plz help how can I avoid this message. Thanks Moved thread from Emergency... (1 Reply)
Discussion started by: Kri
1 Replies

10. Shell Programming and Scripting

Inappropriate ioctl for device

Sample program tty, this will be get called from my script test_script. #include <stdio.h> #include <unistd.h> #define TTY_NAME_MAX 32 #define STDIN_FILENO 0 /* Standard input. */ int main(void) { int ret = 0; char local_device_file; printf("\npid =... (7 Replies)
Discussion started by: Gajendra_PH
7 Replies
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)
All times are GMT -4. The time now is 04:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy