Operating System - HP-UX
1752806 Members
5938 Online
108789 Solutions
New Discussion юеВ

running adb with non-priviledged user

 
AnSi53
Advisor

running adb with non-priviledged user

Hi,
will I run in a problem, if I set /dev/kmem to crw-r--r-- ?? Default is o-r !
If I can do this, a user other like root can run adb - tasks like itick_per_usec .....

Best regards
Andreas
2 REPLIES 2
Peter Godron
Honored Contributor

Re: running adb with non-priviledged user

Andreas,
not sure whether this is part of you asking this question ;-)

If a non-root user needs to know the Processor speed:

perl -e 'local($PSTAT, $PSTAT_PROCESSOR)=(239,10);
local($struct_pst_processor)=("L30");
local($cpu_info, $cpu_ticks);
$cpu_info = "\0" x 120;
syscall($PSTAT, $PSTAT_PROCESSOR, $cpu_info, length($cpu_info), 1, 0);
($cpu_ticks)=(unpack($struct_pst_processor, $cpu_info))[26];
print "speed=".int($cpu_ticks/10000)."\n";'
AnSi53
Advisor

Re: running adb with non-priviledged user

Puh, don't like perl-scripts.
The problem is: we ask every HPs and SUNs some things like mem, CPU-speed and so on.
The command is echo .... | adb -k /stand/vmunix /dev/kmem .....

I can't change this to perl-scripts :-(
Sorry.
Andreas