View previous topic :: View next topic |
Author |
Message |
brent_weaver Guru


Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Thu Sep 10, 2015 3:08 pm Post subject: hdparm - mlock() failed on timing buf: Cannot allocate mem |
|
|
Hello all ... I am trying to have a non-root user run:
I have put the Linux user in the disk group, but still get the following error message:
Code: |
hdparm -T /dev/sda
/dev/sda:
mlock() failed on timing buf: Cannot allocate memory
|
Is this an issue with ulimit? How do I resolve this as I need to use it for monitoring.
Thanks in advance. _________________ Brent Weaver |
|
Back to top |
|
 |
silent_Walker Tux's lil' helper

Joined: 25 Jul 2012 Posts: 100 Location: forums.gentoo.org
|
Posted: Thu Sep 10, 2015 6:20 pm Post subject: |
|
|
Sounds to me like you may be running out of ram:
Quote: | hdparm -T
Perform timings of cache reads for benchmark and comparison pur-
poses. For meaningful results, this operation should be
repeated 2-3 times on an otherwise inactive system (no other
active processes) with at least a couple of megabytes of free
memory. This displays the speed of reading directly from the
Linux buffer cache without disk access. This measurement is
essentially an indication of the throughput of the processor,
cache, and memory of the system under test.
|
How much free memory do you have when you run that command, are you using SWAP?
Are you also running the latest version of hdparm? _________________ ^.^ |
|
Back to top |
|
 |
brent_weaver Guru


Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Thu Sep 10, 2015 8:13 pm Post subject: |
|
|
I am running hdparm-9.43. I should have mentioned that this works perfectly for root user. This server has like 16GB of ram and nothing running on it. Swap flile is untouched. _________________ Brent Weaver |
|
Back to top |
|
 |
silent_Walker Tux's lil' helper

Joined: 25 Jul 2012 Posts: 100 Location: forums.gentoo.org
|
Posted: Tue Sep 15, 2015 6:20 pm Post subject: |
|
|
brent_weaver wrote: | I am running hdparm-9.43. I should have mentioned that this works perfectly for root user. |
Wikipedia ( I know ) says
Quote: | hdparm has to be run with root privileges, otherwise it will either not be found or the requested actions will not be executed properly. |
I know that for Debian, you can run it as a non root user. So it is most likely that the path to hdparm only exists for root users. You could try modifying the path so that a non root user can run it.
Also this is from Linux Questions
Quote: | hdparm is usually in /sbin, which is not part of the path for a normal user. You usually need to be root to use hdparm effectively |
_________________ ^.^ |
|
Back to top |
|
 |
|