Check port usage in linux:
1.
Check which process occupies port 819:
Case9-sghfofo:/usr/local/cnbj/tomcat-bj/bin # lsof-I: 859Result After running:COMMAND PID USER FD TYPE DEVICE SIZE NODE NAMEJava 24907 root 31u IPv4 248905027 TCP *: 859 (LISTEN)
From the above we know that port 859 is occupied by the process with process n
Tag: Port number of the Dubbo service Package Com.github.doctor.dubbo.config;import Java.util.map;import Java.util.map.entry;import Javax.annotation.postconstruct;import Org.springframework.beans.factory.annotation.autowired;import Org.springframework.context.applicationcontext;import Org.springframework.stereotype.component;import Com.alibaba.dubbo.common.utils.netutils;import com.alibaba.dubbo.config.pro
Label: style blog HTTP color Io OS AR
Using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. LINQ; using system. net; using system. net. sockets; using system. text; using system. threading. tasks; using system. windows. forms; namespace scan computer port {public partial class form1: FORM {public form1 () {initializecomponent ();} private void button#click (Object sende
Recently, using SQL Server as a Java database for development, when writing the connection string, think of a problem, how to find the port number of SQL Server? There are two ways1, using Stored procedures
--Query port numberEXEC Sys.sp_readerrorlog 0, 1, ' Listening '
The results are as shownWhich one do you choose? 127.0.0.1:1433 is used here.2, using
1. Log in to the database with the SYS accountSQL Plus Enter the command below: Conn SYS as DBA; Enter the password after the return.Tip: The connection succeeds with the second step.2. Modify the port number bitSQL Plus Enter the command below: Call Dbms_xdb.cfg_update (Updatexml (), Dbms_xdb.cfg_get (),2 '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port
When the serial port number is greater than 10, opening fails. It may be because the serial port path format is incorrect and needs to be changed to the mode. //. // comxx
Hcom = createfile ("//. // com17", // open the serial port 17Generic_read | generic_write, // read and write operations are allowed.0, // exclusive
, hkey_local_machine\system\currentcontrolset\control\terminalserver\winstations\rdp-tcpHere is a:portnumber, double-click Open, in decimal display: 3389, modified to 55555, save to refresh the registry;Then we test, but how to open the Remote Desktop Services, this is very easy, give a diagram:650) this.width=650; "style=" float:none;margin:0px auto 0px 54px; "src=" http://hiphotos.baidu.com/exp/pic/item/ 95afee1f3a292df5869b882bbe315c6034a87370.jpg "class=" Pic-cursor-pointer "height=" 345 "wi
For example, to query port 2181.1. The process ID that the query port occupiesNETSTAT-ANP | grep 2181TCP6 0 :::2181 :::* LISTEN 10997 2181 as port number10997 for PIDYou can also use:lsof-i:2181COMMAND PID USER FD TYPEDEVICE size/OFF NODE namejava 10997 Jim 25u IPv6 197822 0t0 TCP *:2181 (LIST
Some statistical data on the server:
1) Statistics 80 port connection numberNetstat-nat|grep-i "|wc-l"
2) Statistics HTTPD Protocol connection numberPs-ef|grep httpd|wc-l
3), the statistics are connected, the status is "establishedNetstat-na|grep established|wc-l
4), find out which IP address is the most connected, it closed.Netstat-na|grep Established|awk {print $5}|awk-f: {print $1}|sort|uniq-c|sort-r +0n
Netstat-na|grep Syn|awk {print $5}|awk-
Filter the port number used by the service through the name of the service# netstat-upnl|grep NTPD I This command is to filter out the UDP port number of the NTP serviceDP 0 0 172.16.1.4:123 0.0.0.0:* 9591/ntpdUDP 0 0 127.0.0.1:123 0.0.0.0:* 9591/ntpdUDP 0 0 0.0.0.0:123 0.0.0.0:* 9591/ntpdUDP 0 0 fe80::e61f:13ff:fe3:12
Common Commands look at the size of all the files in the directory, similar to the properties of the directory in Windows.
Du-ah--max-depth=1
A indicates that all files and folders (excluding subdirectories) are displayed in the directory, and H means that the max-depth represents the depth of the directory in a way that humans can read.
To view the service and its corresponding port number
Netstat-ap |
, remove any key accordingly to the LRU algorithm# volatile-random, remove a random key with an expire set# allkeys-random, remove a random key, any key# Volatile-ttl, remove the key with the nearest Expire time (minor TTL)# noeviction, don ' t expire at all, just return a error on write operationsMaxmemory-policy ALLKEYS-LRU#aof存储文件Appendfilename "Appendonly-16381.aof"#rdb文件, only for dynamically adding slave processesDbfilename Dump-16381.rdb#cluster配置文件 (Start auto-build)Cluster-config-file n
During web development, we need to change the Tomcat port number to conflict with other required ports.
Steps:
1. Find the conf folder under the Tomcat root directory
2. Find the server. xml file in the conf folder and open
3. Find the followingCode
Maxthreads = "150" connectiontimeout = "20000"Redirectport = "8443" type = "regxph" text = "yourobjectname"/>
4. Change
;python4506------> python4190------> cyrus-master8000------> python993------> dovecot10050------> zabbix_agentd5666------> nrpe10051------> zabbix_server995------> dovecot199------> snmpd10025------ > master110------> dovecot143------> dovecot783------> SPAMD------>-D80------> httpdOf course, can also be implemented in the form of a list of storage, and then read the front end, but here for this I directly in the way of Ajax return this value, mainly combined: Ajax and then use the salt to execu
Demand:Development often meet some of the zombie process, still occupy resources, so I want to kill the corresponding process by the end of the oral methodAnalysis:(1) through the process name to find out the corresponding PID , which is in the " 12164 "(2) Use the PID to find the port that the process occupies, such as "6942"Inverse Problem Solving:PS: Need to use the Awk tool under the third-party Windows platformawk Download: https://pan.baidu.com/
Create Folder test01 under Demo, create index.php file in test01, enter "The last step, find the C-drive under Windows/system32/drivers/etc/hosts, open at the end of the add site "127.0.0.1 test01.com" (127.0.0.1 point to the local localhost, Encounter test01.com domain name start from 127.0.0.1 first)3. Custom Port NumbersOpen httpd.conf, search (Apache default port n
------------I do not have him, but the hand is ripe, humble and foolish, and eager to be hungry-------------on the blog, how to create a Springboot project, so, I this blog about how to run up their first case 1. Prepare a class that allows him to become a controller, controllers, Springboot Web projects with SPRINGMVC integration by default, so look down PackageCn.controller;ImportOrg.springframework.stereotype.Controller;Importorg.springframework.web.bind.annotation.RequestMapping;ImportOrg.sp
To view the Port Occupancy command: Lsof-i View the usage of one of the ports: Lsof-i: Port number to end the process that takes up the interface: Killall process name can also be used command: netstat-APN|grep
Ps-aux Viewing processesTo extract a process:Ps-aux | grep Ps-aux | grep DdLinux View port
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.