找回密码
 注册
查看: 3578|回复: 1

tcping在linux下tar包

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2019-4-1 11:03:29 | 显示全部楼层 |阅读模式
tcping在linux下tar包 TCPing for linux工具是一个在Linux系统下使用TCP协议测试端口开放情况的小工具8 F. V$ h% E5 D  u' Z7 x
0 t1 D# l) C) _( S( c& H& r
参数: tcping [-q] [-t timeout_sec] [-utimeout_usec] <ip addr> <port> / _/ V0 }7 I) @* c. I7 i
; l- ^: D1 ]- |/ K/ c  a' t
-q : quiet mode, do not output anything (except error messages)
5 i# Z5 P7 z' Q; e. D0 X-t : timeout in seconds
3 d  ^+ P& @7 K+ o-u : timeout in microseconds# }# X: i6 y9 R/ M

解压缩,可以看到解压后有4个文件,README中有作者给出的安装使用说明,有兴趣的可以详细读一下。

tar -xvzf tcping-1.3.5.tar.gz

[root@localhost ~]# cd tcping-1.3.5

[root@localhost tcping-1.3.5]# ls

LICENSE  Makefile  README  tcping.c

[root@localhost tcping-1.3.5]#

README中作者给出需要使用make编译,部分linux版本有可能需要安装比较多的编译组件,这里.c文件我们也可以直接使用GCC编译生成执行文件tcping,

[root@localhost tcping-1.3.5]# gcc -o tcping tcping.c

[root@localhost tcping-1.3.5]# ll

total 40

-rw-r--r--. 1 3706 3700  7639 Dec  4  2008 LICENSE

-rw-r--r--. 1 3706 3700  1021 Dec  4  2008 Makefile

-rw-r--r--. 1 3706 3700  1827 Dec  4  2008 README

-rwxr-xr-x. 1 root root 13600 Apr  1 10:57 tcping

8 `: O, c. u/ S" ]- z/ |

-rw-r--r--. 1 3706 3700  4560 Dec  4  2008 tcping.c

将tcping拷贝到路径/usr/bin下面


: e( }+ m7 y0 V9 r

[root@localhost tcping-1.3.5]# cp tcping /usr/bin/

[root@localhost tcping-1.3.5]# tcping

# v% x" Y7 Y" }( x$ I

error: Usage: tcping [-q] [-t timeout_sec] [-u timeout_usec] <host> <port>

# E2 b8 u4 A8 g. O

: Z0 i4 x1 o, e6 n% N/ s

+ n! Z* o7 K0 X' s  w0 t

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-11-23 18:41:15 | 显示全部楼层
也可以使用yum 安装:
4 w3 j# ]; p4 R4 r1 p# yum install -y tcping
' {+ G5 d# P9 h" DLoaded plugins: fastestmirror
' `$ O/ O& f/ x0 m! e- |Loading mirror speeds from cached hostfile
0 c# Z, n4 d; s9 R- [ * base: ftp.sjtu.edu.cn
+ B3 q3 c# A8 c) t+ k3 z * epel: mirror.nyist.edu.cn) I( o9 Y: t  s
* extras: ftp.sjtu.edu.cn
' u# j' C- g/ x- ~ * updates: ftp.sjtu.edu.cn
& S' G. C0 w! H# q5 @$ O8 Q1 J$ f$ LResolving Dependencies
8 f% o' ^  L/ s9 t9 n4 I8 T6 A--> Running transaction check
9 E$ R8 V) y* ~- a* F---> Package tcping.x86_64 0:1.3.5-19.el7 will be installed+ B, n' X; I9 r
--> Finished Dependency Resolution2 H! T6 |0 Y: _
9 \+ p5 X# _6 ]& o
Dependencies Resolved* D7 D" F; ^' a( W/ a5 T

3 b) A: s( Z# }' h% p4 x1 U8 V==================================================================================================================================================================================================================" _$ Q6 m) |4 a
Package                                          Arch                                             Version                                                   Repository                                      Size- Q: C" W# o& P8 b: P
==================================================================================================================================================================================================================! d! ?& D$ `3 z  p5 G& ?
Installing:
! l& M' ~3 _( x: h' }, D- @# t tcping                                           x86_64                                           1.3.5-19.el7                                              epel                                            15 k
! w+ U4 j5 y7 s# j( y# P6 A3 m0 M3 @* l; T  `
Transaction Summary
# d! K; f2 V2 C( |  A# h==================================================================================================================================================================================================================
+ _! {' x/ J5 i- H6 iInstall  1 Package+ f; b2 S& N: U( R
. G7 C7 v  s  ?# j+ ~+ a
Total download size: 15 k
1 h' ^  F$ r# a; D# y: OInstalled size: 20 k
# f; t+ z. a- }; t" A( CDownloading packages:/ Z  T9 x" b9 ]4 K8 O. f
tcping-1.3.5-19.el7.x86_64.rpm                                                                                                                                                             |  15 kB  00:00:00     
, k) i( N# _8 j3 O; l+ h0 l! c9 ]( ZRunning transaction check
" m1 T: D/ \7 U# I. q/ @7 FRunning transaction test
% h. `, A5 d% A3 STransaction test succeeded
& s3 k. y/ u8 x9 k* Y/ ]& j: pRunning transaction
8 D' a# s! n1 |; ]% A  Installing : tcping-1.3.5-19.el7.x86_64                                                                                                                                                                     1/1 - ]) K2 V8 y2 r, q
  Verifying  : tcping-1.3.5-19.el7.x86_64                                                                                                                                                                     1/1 # ]8 b/ @8 D  d5 Q% [
0 N+ t/ }; E) v- T% N
Installed:
! @% Y4 N! c/ D2 c, B0 v( r! O  tcping.x86_64 0:1.3.5-19.el7                                                                                                                                                                                    
' d9 B" X! d6 Y, r  M9 w$ D3 Y! N0 W# C5 a! D
Complete!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:09 , Processed in 0.043034 second(s), 30 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表