Hi:
I find that I have to open the /dev/oprofile/buffer, then I can echo 1 into the /dev/oprofile/enable. May be I'm right.
 
DaFENG
Coder
Telecommunication && Network Industry
Gmail:sunspiderX@gmail.com


From: Da Feng <jvfengda@yahoo.com>
To: "oprofile-list@lists.sourceforge.net" <oprofile-list@lists.sourceforge.net>
Sent: Monday, June 18, 2012 11:07 PM
Subject: how to only use the kernel module

Hi:
I want to code a customized daemon, and only interests in IBS samples. After I traced the opcontrol script, and used the logic to start the kernel module, the /dev/oprofile/enable and buffer didn't work. Though I can use opcontrol to start and stop the kernel module, the following logic leads to an error: echo 1 > /dev/oprofile/enable, "bash: echo: write error: Invalid argument".
After I start the daemon, the above statement works correctly. What's the extra work done by daemon?
=============
MOUNT=/dev/oprofile
modprobe oprofile
mkdir /dev/oprofile >/dev/null 2>&1
mount -t oprofilefs nodev /dev/oprofile >/dev/null
echo 750000 > $MOUNT/ibs_op/max_count
echo 1 > $MOUNT/ibs_op/enable
echo 1 > $MOUNT/ibs_op/dispatched_ops
echo 1 > $MOUNT/enable
 
DaFENG
Coder
Telecommunication && Network Industry
Gmail:sunspiderX@gmail.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list