端口、实例查看

端口查看:

1、Windows平台

在windows命令行窗口下执行:

C:\>netstat -aon|findstr "9050"

TCP 127.0.0.1:9050 0.0.0.0:0 LISTENING 2016

看到了吗,端口被进程号为2016的进程占用,继续执行下面命令:

C:\>tasklist|findstr "2016"

tor.exe 2016 Console 0 16,064 K

-a 表示显示所有活动的TCP连接以及计算机监听的TCP和UDP端口。

-e 表示显示以太网发送和接收的字节数、数据包数等。

-n 表示只以数字形式显示所有活动的TCP连接的地址和端口号。

-o 表示显示活动的TCP连接并包括每个连接的进程ID(PID)。

-s 表示按协议显示各种连接的统计信息,包括端口号。

2.数据库端口查看

查看sql2005数据库的端口号 1)通过 SQL 语句来找到 SQL Server 端口号:

exec sys.sp_readerrorlog 0, 1, 'listening'

LogDate ProcessInfo Text ----------------------- ------------ ---------------------------------------------

2010-11-01 20:26:25.900 服务器 Server is listening on [ 'any' <ipv4> 1433].

2010-11-01 20:26:25.900 服务器 Server is listening on [ 127.0.0.1 <ipv4> 1434].

2010-11-01 20:26:25.900 服务器 Dedicated admin connection support was established for listening locally on port 1434.

这里,1433 就是 SQL Server 监听的端口号。

SQL Server 2005 系统扩展存储过程 sys.readerrorlog 可以读取 SQL Server 服务器日志文件。注意,这里的日志文件是指 SQL Server 服务器日志,而不是 SQL Server 数据库的日志文件。

2)点击电脑左下方的“开始”->“Microsoft SQL Server2005”->“配置工具”->“SQL Server Configuration Manager”-> “展开网络配置” -->点击“MYSQLSERVER协议” -->双击“TCP/IP” -->选择“IP地址”就能看到端口号了

数据库实例名查看:

1.查看SQL2000数据库服务器名和实例名

在查询分析器中输入:

print 'Server Name...............: ' + convert(varchar(30),@@SERVERNAME)

print 'Instance..................: ' + convert(varchar(30),@@SERVICENAME)

2.怎样查看sql2005实例名

开始菜单——运行“regedit” 进入注册表,展开以下目录:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\

在右边窗口中有键名: InstalledInstances

它的键值就是已安装的实例名了。如果有多个实例,每个实例名间有个回车换行符(右键——修改,即可详细查看)。

3.select instance_name from v$instance;

4.我的电脑-->管理-->服务和应用程序-->SQL Server配置管理器

打开SQL Server配置管理器,选择SQL Server服务,就可以看到了。

5.如何查看mssql中的实例:在Services中查看mssql服务名即可,也可以在配置管理器等界面查看到。

 

第二篇:BRAS端口配置查看命令

BRAS设备端口配置查看命令:

1) ERX : show configuration interface g槽位号/端口号.1SVLAN(0)CVLAN 例:SZ-SN-BAS-1.M#show config int g4/1

! Configuration script being generated on FRI MAR 26 2010 17:14:17 CHN ! Juniper Edge Routing Switch ERX-1440

! Version: 8.2.4 patch-0.14 [BuildId 10962] (May 13, 2009 21:45) ! Copyright (c) 1999-2008 Juniper Networks, Inc. All rights reserved. !

! Commands displayed are limited to those available at privilege level 15 !

! NOTE: This script represents only a subset of the full system configuration. interface gigabitEthernet 4/1

ethernet description dT:M-SN-S8512-A::GI0/1/22

mtu 1526

duplex full

speed 1000

qos-profile "GE_port"

encapsulation vlan

2) RED : show configuration port 槽位号/端口号

例:[local]SZ-TB-BAS-3.M#show config port 2/8

Building configuration...

Current configuration:

!

card ge-10-port 2

!

port ethernet 2/8

description dT:FH-FTTB-TianBei-1::GE4

mtu 1526

no auto-negotiate

link-dampening up 2000 down 1000

no shutdown

encapsulation dot1q

dot1q pvc 58

bind interface NMS_FTTX_FengHuo-1 vrNMS_FTTX_FengHuo

ip host 178.3.96.2/26

dot1q pvc 501 encapsulation 1qtunnel

dot1q pvc on-demand 501:101 through 164 encapsulation pppoe idle-down 600

bind authentication pap maximum 5

dot1q pvc on-demand 501:165 through 228 encapsulation pppoe idle-down 600

bind authentication pap maximum 5

3) ME60 : display current-configuration interface g槽位号/0/端口号.1 例:<SZ-SW-BAS-3.M>display cur int g1/0/8.1

#

interface GigabitEthernet1/0/8.1

pppoe-server bind Virtual-Template 0

description Dialer

user-vlan 101 1124 QinQ 507

user-vlan 101 228 QinQ 510

user-vlan 101 1124 QinQ 512

user-vlan 101 484 QinQ 518

user-vlan 101 484 QinQ 520

user-vlan 101 630 QinQ 521

user-vlan 101 292 QinQ 529

user-vlan 357 1124 QinQ 510

user-vlan 613 1124 QinQ 518

user-vlan 613 1124 QinQ 520

user-vlan 632 1124 QinQ 521

bas

access-type layer2-subscriber

roam-domain 163.gd

nas logic-port Ethernet 1/0/8

access-delay 100 even-mac

access-limit 5

#

相关推荐