Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hdparm - mlock() failed on timing buf: Cannot allocate mem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
brent_weaver
Guru
Guru


Joined: 01 Jul 2004
Posts: 510
Location: Burlington, VT

PostPosted: Thu Sep 10, 2015 3:08 pm    Post subject: hdparm - mlock() failed on timing buf: Cannot allocate mem Reply with quote

Hello all ... I am trying to have a non-root user run:

Code:

hdparm -T /dev/sda


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
View user's profile Send private message
silent_Walker
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jul 2012
Posts: 100
Location: forums.gentoo.org

PostPosted: Thu Sep 10, 2015 6:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
brent_weaver
Guru
Guru


Joined: 01 Jul 2004
Posts: 510
Location: Burlington, VT

PostPosted: Thu Sep 10, 2015 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
silent_Walker
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jul 2012
Posts: 100
Location: forums.gentoo.org

PostPosted: Tue Sep 15, 2015 6:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum