event linux
2014-04-24 11:13:45 u011455056 阅读数 586

1. /dev/input目录

    /dev/input目录下的事件都是在驱动中调用input_register_device(struct input_dev *dev)产生的。如我的盒子的/dev/input目录的内容如下:

  1. crw-rw---- root     input     13,  64 1970-01-01 08:00 event0    
  2. crw-rw---- root     input     13,  65 1970-01-01 08:00 event1    
  3. crw-rw---- root     input     13,  66 1970-01-01 08:00 event2    
  4. crw-rw---- root     input     13,  67 1970-01-01 08:00 event3    
  5. crw-rw---- root     input     13,  68 1970-01-01 08:00 event4    
  6. crw-rw---- root     input     13,  69 1970-01-01 08:00 event5    
  7. crw-rw---- root     input     13,  70 2013-08-30 09:56 event6    

    每个event将上报指定的事件,如G-Sensor、触摸屏、Mouse、按键等。

2. 与event对应的设备信息

     与event对应的相关设备信息位于/proc/bus/input/devices,例子如下:

  1. root@android:/ # cat /proc/bus/input/devices    
  2. cat /proc/bus/input/devices    
  3. I: Bus=0019 Vendor=0001 Product=0001 Version=0100    
  4. N: Name="rk29-keypad"    
  5. P: Phys=gpio-keys/input0    
  6. S: Sysfs=/devices/platform/rk29-keypad/input/input0    
  7. U: Uniq=    
  8. H: Handlers=kbd event0 keychord    
  9. B: PROP=0    
  10. B: EV=3    
  11. B: KEY=8000 100000 0 0 0    
  12.     
  13. I: Bus=0019 Vendor=0001 Product=0001 Version=0100    
  14. N: Name="rkxx-remotectl"    
  15. P: Phys=gpio-keys/input0    
  16. S: Sysfs=/devices/platform/rkxx-remotectl/input/input1    
  17. U: Uniq=    
  18. H: <span style="color:#ff0000;">Handlers=kbd event1 keychord    
  19. </span>B: PROP=0    
  20. B: EV=3    
  21. B: KEY=c 70110 260000 0 0 0 20100 2000000 7800000 4000a800 1e16c0 19 78000000 10006ffc    
  22.     
  23. I: Bus=0003 Vendor=0c45 Product=1109 Version=0100    
  24. N: Name="coocaa Device coocaa Wireless Device"    
  25. P: Phys=usb-usb20_host-1.3/input2    
  26. S: Sysfs=/devices/platform/usb20_host/usb2/2-1/2-1.3/2-1.3:1.2/input/input2    
  27. U: Uniq=    
  28. H: Handlers=sysrq kbd event2 keychord    
  29. B: PROP=0    
  30. B: EV=12001b    
  31. B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe    
  32. B: ABS=700 0    
  33. B: MSC=10    
  34. B: LED=1f    
  35.     
  36. I: Bus=0003 Vendor=0c45 Product=1109 Version=0100    
  37. N: Name="coocaa Device coocaa Wireless Device"    
  38. P: Phys=usb-usb20_host-1.3/input3    
  39. S: Sysfs=/devices/platform/usb20_host/usb2/2-1/2-1.3/2-1.3:1.3/input/input3    
  40. U: Uniq=    
  41. H: <span style="color:#ff0000;">Handlers=sysrq kbd event3 keychord    
  42. </span>B: PROP=0    
  43. B: EV=12001f    
  44. B: KEY=4837fff 72ff32d bf544446 0 0 1 30f90 8b17c007 ffe77bfa d941dfff febeffdf ffefffff ffffffff fffffffe    
  45. B: REL=40    
  46. B: ABS=ffffff01 0    
  47. B: MSC=10    
  48. B: LED=1f    
  49.     
  50. I: Bus=0003 Vendor=0c45 Product=1109 Version=0100    
  51. N: Name="coocaa Device coocaa Wireless Device"    
  52. P: Phys=usb-usb20_host-1.3/input4    
  53. S: Sysfs=/devices/platform/usb20_host/usb2/2-1/2-1.3/2-1.3:1.4/input/input4    
  54. U: Uniq=    
  55. H: <span style="color:#ff0000;">Handlers=event4    
  56. </span>B: PROP=0    
  57. B: EV=17    
  58. B: KEY=1f0000 0 0 0 0 0 0 0 0    
  59. B: REL=103    
  60. B: MSC=10    
  61.     
  62. I: Bus=0003 Vendor=0c45 Product=1109 Version=0100    
  63. N: Name="coocaa Device coocaa Wireless Device"    
  64. P: Phys=usb-usb20_host-1.3/input5    
  65. S: Sysfs=/devices/platform/usb20_host/usb2/2-1/2-1.3/2-1.3:1.5/input/input5    
  66. U: Uniq=    
  67. H: <span style="color:#ff0000;">Handlers=sysrq kbd event5 keychord    
  68. </span>B: PROP=0    
  69. B: EV=12001f    
  70. B: KEY=4837fff 72ff32d bf544446 0 0 1 30f90 8b17c007 ffff7bfa d941dfff febeffdf ffefffff ffffffff fffffffe    
  71. B: REL=40    
  72. B: ABS=1 0    
  73. B: MSC=10    
  74. B: LED=1f    
  75.     
  76. I: Bus=0003 Vendor=093a Product=2510 Version=0111    
  77. N: Name="PixArt USB Optical Mouse"    
  78. P: Phys=usb-usb20_host-1.2.4/input0    
  79. S: Sysfs=/devices/platform/usb20_host/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4:1.0/input/input7    
  80. U: Uniq=    
  81. H: <span style="color:#ff0000;">Handlers=event6 </span>   
  82. B: PROP=0    
  83. B: EV=17    
  84. B: KEY=70000 0 0 0 0 0 0 0 0    
  85. B: REL=103    
  86. B: MSC=10   
2011-10-06 20:01:00 iteye_12827 阅读数 15

参考《Linux® Debugging and Performance Tuning: Tips and Techniques》 chapter 8

syslogd

/home/a/j/nomad2:ps -ef |grep klogd root 4364 1 0 07:12 ? 00:00:00 /bin/dd bs 1 if /proc/kmsg of /var/run/klogd/kmsg klog 4366 1 0 07:12 ? 00:00:00 /sbin/klogd -P /var/run/klogd/kmsg nomad2 29513 27878 0 19:43 pts/11 00:00:00 grep klogd /home/a/j/nomad2:ps -ef |grep -i syslogd syslog 4345 1 0 07:12 ? 00:00:05 /sbin/syslogd -u syslog nomad2 29515 27878 0 19:43 pts/11 00:00:00 grep -i syslogd
配置文件:/etc/syslog.conf

The logger command is a shell command interface to Syslog

One method to control managing log files is the use of the logrotate command. It enables automatic rotation, compression, removal, and mailing of log files.相应的配置文件是/etc/logrotate.conf


2011-10-06 20:01:33 nomad2 阅读数 782

参考《Linux® Debugging and Performance Tuning: Tips and Techniques》 chapter 8

syslogd

/home/a/j/nomad2:ps -ef |grep klogd
root 4364 1 0 07:12 ? 00:00:00 /bin/dd bs 1 if /proc/kmsg of /var/run/klogd/kmsg
klog 4366 1 0 07:12 ? 00:00:00 /sbin/klogd -P /var/run/klogd/kmsg
nomad2 29513 27878 0 19:43 pts/11 00:00:00 grep klogd
/home/a/j/nomad2:ps -ef |grep -i syslogd
syslog 4345 1 0 07:12 ? 00:00:05 /sbin/syslogd -u syslog
nomad2 29515 27878 0 19:43 pts/11 00:00:00 grep -i syslogd

配置文件: /etc/syslog.conf

The logger command is a shell command interface to Syslog

One method to control managing log files is the use of the logrotate command. It enables automatic rotation, compression, removal, and mailing of log files.相应的配置文件是/etc/logrotate.conf


2017-01-17 20:08:00 weixin_33775582 阅读数 3
1、下载event源码包
https://pecl.php.net/package/event
如:event-2.0.4.tgz

2、解压
> tar zxvf event-2.0.4.tgz
> cd event-2.0.4

3、通过phpize命令生成configure
> /data/nmp/php/bin/phpize
(*如上路径只作演示,具体视安装环境而定。)

4、生成好后,运行configure
> ./configure --with-php-config=/data/nmp/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent

5、make && make install
> make
> make install

6、如果出现如下信息,说明成功
Installing shared extensions: /data/nmp/php/lib/php/extensions/no-debug-non-zts-20151012/

7、修改php.ini文件
extension_dir = "/data/nmp/php/lib/php/extensions/no-debug-non-zts-20151012/"
extension=event.so

8、重启服务器,查看phpinfo()

 

转载于:https://www.cnblogs.com/jkko123/p/6294589.html

2017-01-17 20:08:00 weixin_33966095 阅读数 5
1、下载event源码包
https://pecl.php.net/package/event
如:event-2.0.4.tgz

2、解压
> tar zxvf event-2.0.4.tgz
> cd event-2.0.4

3、通过phpize命令生成configure
> /data/nmp/php/bin/phpize
(*如上路径只作演示,具体视安装环境而定。)

4、生成好后,运行configure
> ./configure --with-php-config=/data/nmp/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent

5、make && make install
> make
> make install

6、如果出现如下信息,说明成功
Installing shared extensions: /data/nmp/php/lib/php/extensions/no-debug-non-zts-20151012/

7、修改php.ini文件
extension_dir = "/data/nmp/php/lib/php/extensions/no-debug-non-zts-20151012/"
extension=event.so

8、重启服务器,查看phpinfo()

 

转载于:https://www.cnblogs.com/jkko123/p/6294589.html

解决办法:输入set+H即可解决

博文 来自: qq_29015763

Linux Event 事件查看

阅读数 4283

没有更多推荐了,返回首页