listen

zabbix添加主机步骤

梦想与她 提交于 2020-03-24 20:08:56
创建主机 配置基本信息 配置好后点击添加即可: [root@localhost opt]# systemctl start zabbix-agent [root@localhost opt]# netstat -antup|grep zabbix tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 10556/zabbix_agentd tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 10169/zabbix_server tcp 0 1 192.168.43.13:34422 192.168.43.12:10051 SYN_SENT 10561/zabbix_agentd tcp6 0 0 :::10050 :::* LISTEN 10556/zabbix_agentd tcp6 0 0 :::10051 :::* LISTEN 10169/zabbix_server [root@localhost opt]# tail -300f /var/log/zabbix/zabbix_agentd.log 问题: 解决办法:zabbix_agentd.conf 配置没配好,改成主机重启即可 vi /etc/zabbix/zabbix_agentd.confServer=192.168.43.13 ServerActive=192

手写expres

送分小仙女□ 提交于 2020-03-21 19:05:12
// const express = require('express') // const app = express() // app.get('/',function(req,res){ // res.end('我是根目录') // }) // app.get('/good',function(req,res){ // res.end('oh you are good') // }) // app.listen('40087',function(){ // console.log('正在监听40087') // }) 新建一个js模仿express框架,去完成一个自己的express框架,比如下面的这个js文件我们暂且命名为self.js const myExpress = require('./self封装的express.js') const app = myExpress() app.get('/',function(req,res){ res.end('我是根目录') }) app.get('/good',function(req,res){ res.end('oh you are good') }) app.listen('40087',function(){ console.log('正在监听40087') }) 新建一个js文件《self封装的express

Listening folders and files (changes)

谁说胖子不能爱 提交于 2020-01-24 12:44:06
问题 It's possible to listen folders and files changes (by events) on PHP or Node directly, or I need make my own method to do it? Example : I need to listen the folder /user . If I add some file into this directory the PHP or Node receives the information and run PathEvent::fileAdded("/user/user.profile") for instance. If I rename a folder it run PathEvent::pathRenamed("/user/save1", "/user/save2") . I know that PHP don't have an event system like Node. But for PHP I can, for instance, run a

Using C++ and Boost (or not?) to check if a specific port is being used?

早过忘川 提交于 2020-01-13 19:57:49
问题 I am trying to check if a specific port is being used in C++. I am not trying to have the C++ program listen on that port for any reason, just check to see if it is being used. There will be another program listening on that port, and if it stops, I want my program to do something. So, it will check every 10 seconds or so, and if the port is in use, it will do nothing, but if the port becomes available, something will happen. I've been looking at the boost ASIO library, but I can't seem to

Using C++ and Boost (or not?) to check if a specific port is being used?

為{幸葍}努か 提交于 2020-01-13 19:57:34
问题 I am trying to check if a specific port is being used in C++. I am not trying to have the C++ program listen on that port for any reason, just check to see if it is being used. There will be another program listening on that port, and if it stops, I want my program to do something. So, it will check every 10 seconds or so, and if the port is in use, it will do nothing, but if the port becomes available, something will happen. I've been looking at the boost ASIO library, but I can't seem to

What value of backlog should I use?

微笑、不失礼 提交于 2020-01-01 04:42:05
问题 I read the man 2 listen. I don't understand what is the backlog value, it says The backlog argument defines the maximum length to which the queue of pending connections for sockfd may grow Right, how can I define what is the best value? Thanks 回答1: Basically, what the listen() backlog affects is how many incoming connections can queue up if your application isn't accept() ing connections as soon as they come in. It's not particularly important to most applications. The maximum value used by

Difference between await for and listen in Dart

纵然是瞬间 提交于 2019-12-30 06:21:40
问题 I am trying to create a web server stream. Here is the code: import 'dart:io'; main() async { HttpServer requestServer = await HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 8000); requestServer.listen((request) { //comment out this or the await for to work request.response ..write("This is a listen stream") ..close(); }); await for (HttpRequest request in requestServer) { request.response ..write("This is an await for stream") ..close(); } } What is the difference between listen and await

Difference between await for and listen in Dart

时光怂恿深爱的人放手 提交于 2019-12-30 06:21:08
问题 I am trying to create a web server stream. Here is the code: import 'dart:io'; main() async { HttpServer requestServer = await HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 8000); requestServer.listen((request) { //comment out this or the await for to work request.response ..write("This is a listen stream") ..close(); }); await for (HttpRequest request in requestServer) { request.response ..write("This is an await for stream") ..close(); } } What is the difference between listen and await

android listen for app launch

风格不统一 提交于 2019-12-29 07:48:07
问题 I need to develop a service which listen for every activity start. Must I do something like this? ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningAppProcessInfo> runningAppProcessInfo = am.getRunningAppProcesses(); for (int i = 0; i < runningAppProcessInfo.size(); i++) { Log.v("Proc: ", runningAppProcessInfo.get(i).processName); } And do I need to do it every X seconds? Does it affect battery consumption? 回答1: As far as I know

Android Intercepting Events From Other Apps

Deadly 提交于 2019-12-25 12:33:10
问题 Does anyone knows how to intercept events from other 3rd party Apps, say, games, Maps, etc. This includes events like motionevents, screen prompts, etc. We have limited success with capturing touch events via the AccessibilityService, click, longclick, etc. But hitting a blank dealing with motionevents such as gestures or how the users are interacting with the screen. (we have approval from users to capture such information in a control study) We believe that if we root the phone (mess with