Hardware :: How To Spin-up HDD Using Ioctl
May 8, 2010
I have used the following code for HDD spindown.
Quote:
{
#ifndef WIN_STANDBYNOW1
#define WIN_STANDBYNOW1 0xE0
#endif
[code]....
Is ther any ioctl command to do HDD spin-up from spin-down? or Is there any way to HDD spin-up?
View 2 Replies
ADVERTISEMENT
Jul 4, 2011
I want to modify ioctl TIOCMWAIT to return the same thing that ioctl TIOCMGET returns. Currently wait returns an int of zero or -1 when a change in status occurs. Why not make it return the new status?
This will make the operation faster by not requiring another call to ioctl.The extra call requires 2 to 16 uSeconds to complete on my x64 laptop. How would I make this proposal to the kernal people?
View 1 Replies
View Related
Nov 6, 2010
there is a simple command like: Code: yum spininstall "name spin" that allows you to install all packages with a simple command? it would be nice if there :-)
View 3 Replies
View Related
Feb 4, 2011
I am able to retrieve IPv4 addresses with ioctl. But it is not returning IPv6 addresses. My requirement is to get both IPv4 and IPv6 addresses. I can not use getifaddrs() since it has to be common code between linux, solaris and aix. Solaris and AIX are not having getifaddrs(). Following code is returning only IPv4 addresses.
Code:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netdb.h>
[Code]....
View 1 Replies
View Related
May 24, 2010
I have a problem with USB modem SpeedTouch 330 in SUSE
When I execute:
Code:
I see this:
Code:
I have checked command 'lsmod' and it returns
Code:
In general I see speedtch is several times in the output of lsmod
When I check this:
Code:
I see
Code:
Why I cannot establish a connection to the internet?
View 1 Replies
View Related
Feb 28, 2011
I was trying to get the ssid of WLAN through the following C program
What is the cause of this error?
View 1 Replies
View Related
Jul 21, 2010
I'm creating a usb device driver that needs to be able to read from two different endpoints. I couldn't see any way of having two read functions in the driver, so I got round this by reading from one of the endpoints with read, and the other with ioctl.However this hasn't worked, the ioctl call from c returns -1. I added a printk command in the driver in the ioctl function, however looking at kern.log I can see that this function is never being called. Does anyone have any ideas as to what the problem called be, or a better method of being able to read from two different endpoints?
View 2 Replies
View Related
Jan 18, 2011
I just want to read and write some values (integer) to my driver. I used put/get user but always getting errors.
driver
Quote:
int Wert;
static int device_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsinged long arg)
int ret;
[code]...
Quote:
int WERT
ret=ioctl(fd, SETIT, WERT)
ret=ioctl(fd, GETIT, WERT)
if i say in C++ WERT is 5 the value arg of the driver becomes 5 but not WERT the returnvalue of get and put user is -1 so it failed.
View 12 Replies
View Related
May 19, 2010
I have retrieved IPv4 address successfully using
Code:
struct ifreq ifr;
fd = socket(AF_INET, SOCK_DGRAM, 0);
ifr.ifr_addr.sa_family = AF_INET;
ioctl(fd, SIOCGIFADDR, &ifr)
for IPv6 address I tried
[Code]....
View 5 Replies
View Related
Apr 8, 2010
I have a kernel function device_ioctl(). How do I define it in file_operations?
1. struct file_operations memory_fops = {
ioctl:device_ioctl
};
2. struct file_operations memory_fops = {
.ioctl=device_ioctl
};
3. struct file_operations memory_fops = {
device_ioctl
};
which one is the right one?
View 1 Replies
View Related
Feb 12, 2010
Hi I am trying to add the device by using followig code strip and it says that eth1 is not defind in the code.
strncpy(ifr.ifr_name,eth1,IFNAMSIZ);
if (ioctl(sd, SIOCGIFINDEX, &ifr) == -1) {
return 0;
}
How do I write down the DEVICE name in the ifr.ifr_name structure ?
View 2 Replies
View Related
Jul 2, 2010
I come here as a technical PC user and fan of the Ubuntu forums ^^..I am the current owner of a Western Digital Portable HDD - Blue - 320 GB (Advertised).Recently, I have discovered I had bad sectors (Which were remapped I guess according to Ubuntu's Disk Utility-message that popped up in the upper right)... How is something I don't know because I have already had it replaced due to an internal busted USB port, and have taken really good care of it.Well, I right-clicked in My Computer on the drive (Windows XP) and ran Windows Error Checking on it. It took over a day and finally came up with a failure message. During the test, the drive made funky (yes, funky) noises and now is inaccessible. (It will NOT spin up, or show up as a drive in XP ANYWHERE (Including Device Manager) [but it does go into sleep mode o.0])
I do not have my files backed up, and this is so because this IS my backup =. (Or.. 'Temporary File Storage' for the critics out there.)I have access to WinXP, Vista, Ubuntu, Mac OSX, and Win7, and the bottom line is that I don't know what to do.. I bought it at Walmart (about $100) and also a replacement plan.. but the thing is, I'm not sure if it is dead, and whether or not I can somehow recover my files without disassembly..I'm thinking that maybe the Sata / USB internal interface is dead, but wouldn't putting it into another enclosure void the warrantee?Help? (I'm sorry in advance if this has been posted in the past... I would just like to know what I should do)I know this involves Windows, but from reading what I have, I have determined that this forum has more intelligent people than any other.
View 5 Replies
View Related
Apr 23, 2010
Does fedora 12 lxde spin have opeoffice.org?
View 1 Replies
View Related
May 9, 2010
System Specs
3.2 GHz Dell GX280
Sans Digital TR5M-B in JBOD configuration (PCIe 1x)
CentOS 5.4 installed via QmailToaster instructions. Up to date via YUM.
No GUI (no KDE/Gnome), command line only.
My old server died and reinstalled based on above with no problems. All is running well. Box is used as mail/web/home disk network. I want to be able to spin down the drives in the Sans Digital box when idle as they are used mostly for bulk storage (video editing, etc...). The external enclosure on my old server automatically spun down idle drives so this has never been a concern. Google has not helped me so far (operator error?). I did see "hdparm" may work if the drives support it but I am not sure if this is the nest solution.
View 1 Replies
View Related
Jul 1, 2010
I use ioctl to get the console window size (the SSH window). I use the following code:
struct winsize ws;
int returnValue = ioctl(pCommandStructure->terminal, TIOCGWINSZ, &ws);
int numberOfColumnsOfTerminalWindow = ws.ws_col;
When I debug on linux pc, it gives me the correct window width. But after I try it on router (this is my enventual place where my code shall run), ioctl always give me 0 width, that is, numberOfColumnsOfTerminalWindow == 0. but the returnValue is 0 which means that the function call succeeds.
View 2 Replies
View Related
Apr 6, 2011
I am having the following problem. The following code works fine on my P.C. Ubuntu x64, and on a jetway mini-itx board with an atom processor. The problem is, the same code doesn't work on the intel equivalent of the jetway board. I thought the maybe, I didn't have the port configured right, so I turned on Hardware Flow control and also tried turning on the modem bits I needed with TIOCMBIS. Neither worked. Here is the code. There are two threads, one of them, respsponding to the client, and using the RTS and DTR pins to power two relays. The other, manages listening to CTS and DSR for input. Here is the class with the first thread.
Code:
/*
* DigitalIOCore.cpp
*
* Created on: Nov 1, 2010
* Author: jonathan
[code]....
View 9 Replies
View Related
Jul 22, 2011
Please send me the code how to assign ipv6 address using ioctl system call using C.
View 1 Replies
View Related
Sep 24, 2010
This morning I logged in and typed startx. My box said:
(EE) ioctl EVIOCGNAME failed: Inappropriate ioctl for device
(EE) PreInit returned NULL for "Mouse1"
Since I have two computers, basically identical, I looked up stuff on one and I decided to upgrade the problem box to 13.1 from 13.0 since that would undoubtedly fix the problem. Well, the problem is the same. However, root can startx just fine. Also, gpm seems to work fine for the user.
View 4 Replies
View Related
Nov 9, 2010
I've installed the Xfce spin of Fedora 14 (64). The Panel (or main task bar) has several icons by default and as most people. I like to add/remove and move the different items and shortcuts. I can add and remove, however moving items I cannot. When I right-click and select 'Move', the Panel turns gray, in fact it's completely grayed out, like locked. For info, it was absolutely fine in F13.
View 3 Replies
View Related
Jul 13, 2011
I want a automatic login in my system with fedora 15 LXDE Spin. I followed the steps given in this thread but it doesn't work. There is no login screen option in administration also. What should I do?
View 4 Replies
View Related
Dec 30, 2010
I realize this has been asked many times before, but I'm fairly certain I've read through the majority of those threads and haven't found a working solution yet. I recently built up a Ubuntu Server 10.10 x64 box for backups, serving up files, and development activities. The server is running SATA drives in AHCI mode. Because this is a file server I have quite a few hard drives installed, which are currently a mix of WD 1TB Black and Green drives. I'm attempting to get my non-boot/data only drives to spin down after 10 minutes. I've tried the following:
1. Edit hdparm.conf with the following, replacing 'b' with the identifier for each disk:
Code:
/dev/sdb {
spindown_time = 120
}
This fails, and based on my research I'm pretty sure udev isn't properly running the hdparm configuration anyway.
2. I've also tried manually setting the spin down time with hdparm as follows (via command line and through rc.local):
Code:
hdparm -q -S 120 /dev/sdb
Which states that it successfully set the spin down timer to 10 minutes, but this also fails as the drive never spins down.
3. Finally, I just forced it to spin down immediately with:
Code:
hdparm -y /dev/sdb
This worked! Unfortunately, that approach isn't terribly useful. The drive stayed spun down for 20 minutes (thus far), so I haven't bothered to run iostat, etc to try and figure out if something is keeping the drives active. I don't believe there is because one of my drives isn't even mounted currently and it also won't spin down automatically.
View 5 Replies
View Related
Mar 1, 2011
I have a NAS box that runs Ubuntu Server and Samba. 4 of the HDDs are in RAID5 (/dev/md1) and I've configured them to spin down after 10 minutes of inactivity. This filesystem is mounted on /share/Media. The other 2 HDDs are NOT configured to spin down. My other computer runs Ubuntu Desktop. I'm mounting the entire /share folder (that's located on NAS) using this entry in /etc/fstab:
[Code]...
View 2 Replies
View Related
Aug 13, 2011
(Ubuntu 10.10) I went to System->Preferences->Power Management and checked spin down hard disks whet possible. I have two internal sata hard drives. One is for the OS and the other is for media. Neither Hard disk is being spun down. Is there something else I need to do?
View 5 Replies
View Related
Jun 24, 2011
Now i have a problem.I want to used a hid usb device under linux 2.6.11.But i can't know how to used ioctl function to send and receive data to a hid device
View 3 Replies
View Related
Apr 12, 2014
I have a WD20EZRX (Green) 3.5" hard drive installed in an external USB3 case (Icy Box IB-351StU3S-B), which is detected as an AS2105 device in Debian 7 (Linux 3.13 from back ports). My computer is a TP X200s. The problem is that the hard drive does not spin down even with hdparm -S timeout set and the file system unmounted. It does spin down with the hdparm -y command, though, and stays that way until accessed. The case also seems to prevent the TP entering standby mode, or at least the indication light is left blinking when the lid is closed. Other than this, the drive works fine. It does have a GPT partition scheme and ext3 file system.
Note that the TP does have only USB2 ports.
View 0 Replies
View Related
May 9, 2011
I have installed a LXDE F14 spin into my laptop cause I its older, the thing is that I would like to use Gnome login screen, like where you choose your desktop management and insert your password. I have gnome installed as well..
PS. or can I just update LXDE to the version that comes with F15 (I looked to it quickly and seemed cool) without fresh install ?
View 1 Replies
View Related
Jun 21, 2010
Ubuntu is not spinning-down my external hard drive when idle. How can I enable this?
View 1 Replies
View Related
Jul 10, 2011
I'm running 10.10 with about 10 SATA disks attached. If I spin them down with hdparm -Y, every disk that has a filesystem on it (but -not- disks that are partitioned but have no filesystem) spin up, simultaneously, about every 10 hours. How do I find the culprit? The machine is sitting effectively idle---I know it's not something I'm doing that's causing the spinups.Is there some way to monitor -anything- that touches a particular block device?
My suspicion is that this might be the gnome low-disk-space warning daemon statting everything. (This -used- to be gnome-volume-manager, but I'm not sure where that code went when GVM was dropped in 10.10---how do I find that code? What package is it in?)
And if it -is- the disk-space monitor, how do I kill it dead? Not just "don't tell me about disks", but "don't even bother looking". I would -really- like these drives to spin down and -stay- down, possibly for days or weeks, until needed---not spin up every 10 hours until I either manually spin them down or until whatever I've set in hdparm spins them back down.
View 9 Replies
View Related
Aug 29, 2010
I want to install Fedora KDE spin on an existing XFS partition without formatting it. (Since said partition is full of my data that I have nowhere else to put). But the installer doesn't allow me to set the partition as / without formatting. XFS is not one of the filesystems listed as options for formatting. How can I make Fedora do what I want?
View 7 Replies
View Related
Jun 24, 2010
So, I have raid5 array with one spare disk. Is it possible to spin-off/shutdown the spare disk until one drive fails and the spare disk is needed?
View 1 Replies
View Related