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

tcping在linux下tar包

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2019-4-1 11:03:29 | 显示全部楼层 |阅读模式
tcping在linux下tar包 TCPing for linux工具是一个在Linux系统下使用TCP协议测试端口开放情况的小工具" `; h! Q( d. ]  Z

, k: [" a9 E* ?0 u1 {/ k- K4 s4 X参数: tcping [-q] [-t timeout_sec] [-utimeout_usec] <ip addr> <port>
% _* \, l. Z* i& b, w5 T4 o6 n" n0 h$ u$ |7 D
-q : quiet mode, do not output anything (except error messages) ( U' R/ f- R$ M9 z& G& x
-t : timeout in seconds$ m1 q( N. C+ G) r/ W
-u : timeout in microseconds
- o8 `, u: L4 ^) ^( D1 u

解压缩,可以看到解压后有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


6 w, W# ^$ i$ P! L1 d

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

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

# u& i8 ?% B; g9 O( d8 B

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

[root@localhost tcping-1.3.5]# tcping

" z, l! g& Q( b& N

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

. P2 J- F" @. k& M( t' ]# _


& l5 @5 k( @; S# V/ Q  W% R
9 A6 a; l' ~0 E1 ^( ]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-11-23 18:41:15 | 显示全部楼层
也可以使用yum 安装:
0 n  S+ K6 A+ x5 E7 T9 Z% j) t# yum install -y tcping
4 @3 m7 Z$ `% L0 V, M. YLoaded plugins: fastestmirror- H. a' f. {  R
Loading mirror speeds from cached hostfile
. W0 E% y0 |0 k; D; U8 {) }% k, E& G * base: ftp.sjtu.edu.cn4 j5 h! o# s7 t2 b/ l, r
* epel: mirror.nyist.edu.cn
. a0 x+ s; ~2 c) t. H5 J" k9 v * extras: ftp.sjtu.edu.cn$ n  `# b/ ^  n
* updates: ftp.sjtu.edu.cn
1 c! j* K" u5 OResolving Dependencies- A# Q6 \& T5 b  i# I0 m
--> Running transaction check: ^3 T8 g, S5 J2 l% c
---> Package tcping.x86_64 0:1.3.5-19.el7 will be installed
2 v  Z. X, t1 V& M--> Finished Dependency Resolution
: y- q1 i7 y/ @& l) `2 ^5 a" e- r: R* H
Dependencies Resolved
& L- ?; R& f% V. z* d! D* z
& K# M9 Q7 M0 u! I7 S3 U==================================================================================================================================================================================================================3 c1 ]. {$ l$ C2 q5 v* v. Y- v+ n
Package                                          Arch                                             Version                                                   Repository                                      Size
8 x& ?- l  y' t1 M==================================================================================================================================================================================================================
$ ^! A: t5 s$ J* g. fInstalling:
$ M, s- X# Q$ i2 F9 H1 ` tcping                                           x86_64                                           1.3.5-19.el7                                              epel                                            15 k
) X  R$ ?5 F# ^' ?' o! f0 v. v$ a' ?+ g* P' B' Q( U
Transaction Summary
+ c- F$ v# `5 Q+ C==================================================================================================================================================================================================================6 `, A$ E7 V9 T9 Q5 ~% ^& W
Install  1 Package
( B. @, J& D- O; w; T0 @4 z. u9 ~, s3 H, w: P  }
Total download size: 15 k7 j* k% ]0 z8 N
Installed size: 20 k4 T' |) v! W, \0 x5 {
Downloading packages:5 g; u2 D8 J5 g: X: N8 [' j
tcping-1.3.5-19.el7.x86_64.rpm                                                                                                                                                             |  15 kB  00:00:00     . P' ^. h2 _0 e* V- |$ p4 a* _
Running transaction check
& T* e2 B0 Q0 R. r7 K# B5 ?- ^Running transaction test
2 b# X- D* I% M' F# z5 S" Y' TTransaction test succeeded; F2 U9 Z0 D: s' R5 N1 O& P/ l, E. A
Running transaction$ d. T; O0 S9 K( j. q. w. P5 h8 P
  Installing : tcping-1.3.5-19.el7.x86_64                                                                                                                                                                     1/1 : V4 x3 z4 q3 b+ B5 x8 ^( a  Q
  Verifying  : tcping-1.3.5-19.el7.x86_64                                                                                                                                                                     1/1 ! H4 N' J) o% z1 q/ M0 r
8 d0 j/ a/ W- ^- W8 x3 Y. L
Installed:
) z' l& f9 M, d  tcping.x86_64 0:1.3.5-19.el7                                                                                                                                                                                    
2 b2 F) H1 h& y4 k. D
7 w" F- I8 l4 o! x5 Q$ H1 H$ ?Complete!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 23:04 , Processed in 0.032730 second(s), 30 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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