搜尋
Shell分析accessJun 07, 2016 pm 03:50 PM
accessshelltcp分析查看連接埠連接

#查看80端口的tcp连接 #netstat -tan | grep ESTABLISHED | grep :80 | wc -l 1 #当前WEB服务器中联接次数最多的ip地址: #netstat -ntu |awk '{print $5}' |sort | uniq -c| sort -n -r 231 ::ffff:127.0.0.1:8095 23 ::ffff:192.168.50.201:5432 2 ::ffff:1

#查看80端口的tcp连接

#netstat -tan | grep "ESTABLISHED" | grep ":80" | wc -l

1

#当前WEB服务器中联接次数最多的ip地址:

#netstat -ntu |awk '{print $5}' |sort | uniq -c| sort -n -r

231 ::ffff:127.0.0.1:8095

23 ::ffff:192.168.50.201:5432

2 ::ffff:192.168.50.203:80

1 servers)

1 ::ffff:192.168.50.56:43314

1 ::ffff:192.168.50.21:2996

1 ::ffff:192.168.50.21:2989

1 ::ffff:192.168.50.200:8060

1 ::ffff:192.168.50.12:1300

1 ::ffff:192.168.50.12:1299

1 ::ffff:192.168.50.12:1298

1 ::ffff:127.0.0.1:57933

1 Address

1 192.168.50.41:65310

1 192.168.50.41:64949

1 192.168.50.41:49653

#查看日志中访问次数最多的前10个IP

#cat access_log |cut -d ' ' -f 1 |sort |uniq -c | sort -nr | awk '{print $0 }' | head -n 10 |less

14085 121.207.252.122

13753 218.66.36.119

11069 220.162.237.6

1188 59.63.158.118

1025 ::1

728 220.231.141.28

655 114.80.126.139

397 117.25.55.100

374 222.76.112.211

348 120.6.214.70

#查看日志中出现100次以上的IP

#cat access_log |cut -d ' ' -f 1 |sort |uniq -c | awk '{if ($1 > 100) print $0}'|sort -nr |less

14085 121.207.252.122

13753 218.66.36.119

11069 220.162.237.6

1188 59.63.158.118

1025 ::1

728 220.231.141.28

655 114.80.126.139

397 117.25.55.100

374 222.76.112.211

348 120.6.214.70

252 58.211.82.150

252 159.226.126.21

206 121.204.57.94

192 59.61.111.58

186 218.85.73.40

145 221.231.139.30

134 121.14.148.220

123 222.246.128.220

122 61.147.123.46

119 121.204.105.58

107 116.9.75.237

105 118.123.5.173

#查看最近访问量最高的文件

#cat access_log |tail -10000|awk '{print $7}'|sort|uniq -c|sort -nr|less

8729 /server-status?auto

618 /

15 /favicon.ico

12 /manager/html

10 *

9 /top/icons.gif

8 /www.766.com/awstats.www.766.com.html

8 /awstatsicons/other/vv.png

8 /awstatsicons/other/vu.png

8 /awstatsicons/other/vp.png

8 /awstatsicons/other/vk.png

8 /awstatsicons/other/vh.png

8 /awstatsicons/other/hx.png

8 /awstatsicons/other/hp.png

8 /awstatsicons/other/hk.png

8 /awstatsicons/other/hh.png

8 /awstatsicons/other/he.png

8 /awstatsicons/other/awstats_logo6.png

8 /awstatsicons/os/win.png

8 /awstatsicons/os/unknown.png

8 /awstatsicons/os/unix.png

8 /awstatsicons/os/symbian.png

8 /awstatsicons/os/psp.png

#查看最近访问量最高的页面(.png)

#cat access_log |awk '{print $7}'|grep '.png'|sort|uniq -c|sort -nr |head -n 10

241 /awstatsicons/other/awstats_logo6.png

227 /awstatsicons/clock/hr12.png

226 /awstatsicons/other/vv.png

226 /awstatsicons/other/vu.png

226 /awstatsicons/other/vp.png

226 /awstatsicons/other/vk.png

226 /awstatsicons/other/vh.png

226 /awstatsicons/clock/hr9.png

226 /awstatsicons/clock/hr8.png

226 /awstatsicons/clock/hr7.png

#查看日志中访问超过100次的页面

#cat access_log | cut -d ' ' -f 7 | sort |uniq -c | awk '{if ($1 > 100) print $0}' | less

20107 /

1027 *

215 /awstatsicons/browser/chrome.png

215 /awstatsicons/browser/firefox.png

136 /awstatsicons/browser/mozilla.png

216 /awstatsicons/browser/msie.png

201 /awstatsicons/browser/netscape.png

123 /awstatsicons/browser/notavailable.png

214 /awstatsicons/browser/opera.png

215 /awstatsicons/browser/pdaphone.png

214 /awstatsicons/browser/safari.png

215 /awstatsicons/browser/unknown.png

226 /awstatsicons/clock/hr10.png

226 /awstatsicons/clock/hr11.png

227 /awstatsicons/clock/hr12.png

225 /awstatsicons/clock/hr1.png

226 /awstatsicons/clock/hr2.png

226 /awstatsicons/clock/hr3.png

226 /awstatsicons/clock/hr4.png

226 /awstatsicons/clock/hr5.png

226 /awstatsicons/clock/hr6.png

226 /awstatsicons/clock/hr7.png

226 /awstatsicons/clock/hr8.png

#access_log昨天一天的点击量(clicks);

cat access_log|grep '12/Nov/2009'|grep "******.jsp"|wc|awk '{print $1}'|uniq

0

#昨天访问网站的独立IP有多少;

cat access_log|grep '12/Aug/2009'|grep "******"|wc|awk '{print $1}'|uniq

194

#统计某url,一天的访问次数

#cat access_log|grep '12/Aug/2009'|grep '/images/index/e1.gif'|wc|awk '{print $1}'

2

#拉出前五天的访问次数最多的网页前20名清单;进行五天日志对比,找出排名靠前重复的网页,即可得出本周访问量最大的前几个网页;

#cat access_log|awk '{print $7}'|uniq -c |sort -n -r|head -20

10519 /

654 /manager/html

450 /manager/html

397 /

368 /manager/html

304 /

280 /manager/html

279 /

263 /manager/html

252 /manager/html

252 /manager/html

226 /

220 /

193 /

187 /

180 /

167 /

166 /

134 /

129 /

#从日志里查看该ip在干嘛:

#cat access_log | grep 218.66.36.119| awk '{print $1"/t"$7}' | sort | uniq -c | sort -nr | less

243 218.66.36.119 /

210 218.66.36.119 /awstatsicons/other/awstats_logo6.png

198 218.66.36.119 /awstatsicons/clock/hr12.png

197 218.66.36.119 /awstatsicons/other/vv.png

197 218.66.36.119 /awstatsicons/other/vu.png

197 218.66.36.119 /awstatsicons/other/vp.png

197 218.66.36.119 /awstatsicons/other/vk.png

197 218.66.36.119 /awstatsicons/other/vh.png

197 218.66.36.119 /awstatsicons/clock/hr9.png

197 218.66.36.119 /awstatsicons/clock/hr8.png

197 218.66.36.119 /awstatsicons/clock/hr7.png

197 218.66.36.119 /awstatsicons/clock/hr6.png

197 218.66.36.119 /awstatsicons/clock/hr5.png

197 218.66.36.119 /awstatsicons/clock/hr4.png

197 218.66.36.119 /awstatsicons/clock/hr3.png

197 218.66.36.119 /awstatsicons/clock/hr2.png

197 218.66.36.119 /awstatsicons/clock/hr1.png

197 218.66.36.119 /awstatsicons/clock/hr11.png

#列出传输时间超过 30 秒的文件

#cat access_log|awk ‘($NF > 30){print $7}’|sort -n|uniq -c|sort -nr|head -20

14058 /server-status?auto

8966 /

3955 /manager/html

1025 *

214 /www.766.com/awstats.www.766.com.html

211 /awstatsicons/other/awstats_logo6.png

199 /awstatsicons/clock/hr12.png

198 /awstatsicons/other/vv.png

198 /awstatsicons/other/vu.png

198 /awstatsicons/other/vp.png

198 /awstatsicons/other/vk.png

198 /awstatsicons/other/vh.png

198 /awstatsicons/clock/hr9.png

198 /awstatsicons/clock/hr8.png

198 /awstatsicons/clock/hr7.png

198 /awstatsicons/clock/hr6.png

198 /awstatsicons/clock/hr5.png

198 /awstatsicons/clock/hr4.png

198 /awstatsicons/clock/hr3.png

198 /awstatsicons/clock/hr2.png

#列出最最耗时的页面(超过60秒的)的以及对应页面发生次数

#cat access_log |awk ‘($NF > 60 && $7~//.php/){print $7}’|sort -n|uniq -c|sort -nr|head -100

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
如何在 Windows 11 上安装经典 Shell?如何在 Windows 11 上安装经典 Shell?Apr 21, 2023 pm 09:13 PM

<p>定制您的操作系统是让您的日常生活更加愉快的绝佳方式。您可以更改用户界面、应用自定义主题、添加小部件等等。因此,我们今天将向您展示如何在Windows11上安装ClassicShell。</p><p>该程序已经存在了很长时间,并允许您修改操作系统。志愿者现在已经开始运营该组织,该组织于2017年解散。新项目名为OpenShell,目前在Github上可供感兴趣的人使用。</p>&a

Explorer.exe 在系统启动时不启动 [修复]Explorer.exe 在系统启动时不启动 [修复]Jun 03, 2023 am 08:31 AM

如今,许多Windows用户开始遇到严重的Windows系统问题。问题是系统加载后Explorer.exe无法启动,用户无法打开文件或文件夹。虽然,Windows用户在某些情况下可以使用命令提示符手动打开Windows资源管理器,并且每次系统重新启动或系统启动后都必须这样做。这可能是有问题的,并且是由于下面提到的以下因素造成的。损坏的系统文件。启用快速启动设置。过时或有问题的显示驱动程序。对系统中的某些服务进行了更改。修改后的注册表文件。请记住以上所有因素,我们提出了一些肯定会对用户有所帮助

PowerShell 部署失败并出现 HRESULT 0x80073D02 问题修复PowerShell 部署失败并出现 HRESULT 0x80073D02 问题修复May 10, 2023 am 11:02 AM

您在运行脚本时是否看到此错误消息“Add-AppxPackage:部署失败,HRESULT:0x80073D02,无法安装该包,因为它修改的资源当前正在使用中。PowerShell中出现错误0x80073D02…”?如错误消息所述,当用户在前一个进程运行时尝试重新注册一个或所有WindowsShellExperienceHost应用程序时,确实会发生这种情况。我们已经获得了一些简单的解决方案来快速解决这个问题。修复1–终止体验主机进程您必须在执行powershell命令之前结束

Linux快速删除文件末尾行的操作步骤Linux快速删除文件末尾行的操作步骤Mar 01, 2024 pm 09:36 PM

Linux系统下在处理文件时,有时候需要删除文件末尾的行。这种操作在实际应用中很常见,可以通过一些简单的命令来实现。本文将介绍在Linux系统中快速删除文件末尾行的操作步骤,同时提供具体的代码示例。步骤一:查看文件末尾行在进行删除操作之前,首先需要确认文件的末尾行是哪一行。可以使用tail命令来查看文件的末尾行,具体命令如下:tail-n1filena

在 Windows 上运行 shell 脚本文件的不同方法在 Windows 上运行 shell 脚本文件的不同方法Apr 13, 2023 am 11:58 AM

适用于 Linux 的 Windows 子系统第一种选择是使用适用于 Linux 或 WSL 的 Windows 子系统,这是一个兼容层,用于在 Windows 系统上本地运行 Linux 二进制可执行文件。它适用于大多数场景,允许您在 Windows 11/10 中运行 shell 脚本。WSL 不会自动可用,因此您必须通过 Windows 设备的开发人员设置启用它。您可以通过转到设置 > 更新和安全 > 对于开发人员来完成。切换到开发人员模式并通过选择是确认提示。接下来,查找 W

以下是 Open Shell Windows 11 无法正常工作问题的修复以下是 Open Shell Windows 11 无法正常工作问题的修复Apr 14, 2023 pm 02:07 PM

无法在Windows 11上运行的 Open shell 并不是一个新问题,并且自从这个新操作系统问世以来一直困扰着用户。Open-Shell Windows 11 不工作问题的原因并不具体。它可能是由程序中的意外错误、病毒或恶意软件的存在或损坏的系统文件引起的。对于那些不知道的人,Open-Shell 是 2017 年停产的 Classic Shell 的替代品。您可以查看我们的教程,了解如何在 Windows 11 上安装 Classic Shell。如何替换 Windows 11 的开始菜

超硬核!11个非常实用的 Python 和 Shell 拿来就用脚本实例!超硬核!11个非常实用的 Python 和 Shell 拿来就用脚本实例!Apr 12, 2023 pm 01:52 PM

Python 脚本部分实例:企业微信告警、FTP 客户端、SSH 客户端、Saltstack 客户端、vCenter 客户端、获取域名 ssl 证书过期时间、发送今天的天气预报以及未来的天气趋势图;Shell 脚本部分实例:SVN 完整备份、Zabbix 监控用户密码过期、构建本地 YUM 以及上篇文章中有读者的需求(负载高时,查出占用比较高的进程脚本并存储或推送通知);篇幅有些长,还请大家耐心翻到文末,毕竟有彩蛋。Python 脚本部分企业微信告警此脚本通过企业微信应用,进行微信告警,可用于

如何安装 Open Shell 以恢复 Windows 11 上的经典开始菜单如何安装 Open Shell 以恢复 Windows 11 上的经典开始菜单Apr 18, 2023 pm 10:10 PM

OpenShell是一个免费的软件实用程序,可用于自定义Windows11开始菜单,使其类似于经典风格的菜单或Windows7样式的菜单。以前版本的Windows上的开始菜单为用户提供了一种浏览其系统内容的简单方法。基本上,OpenShell是ClassicShell的替代品,它提供了不同的用户界面元素,有助于从以前的Windows版本获取后一个版本的功能。一旦ClassicShell的开发在2017年停止,它就由GitHub志愿者以OpenShell的名义维护和开发。它与Win

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
3 週前By尊渡假赌尊渡假赌尊渡假赌

熱工具

WebStorm Mac版

WebStorm Mac版

好用的JavaScript開發工具

mPDF

mPDF

mPDF是一個PHP庫,可以從UTF-8編碼的HTML產生PDF檔案。原作者Ian Back編寫mPDF以從他的網站上「即時」輸出PDF文件,並處理不同的語言。與原始腳本如HTML2FPDF相比,它的速度較慢,並且在使用Unicode字體時產生的檔案較大,但支援CSS樣式等,並進行了大量增強。支援幾乎所有語言,包括RTL(阿拉伯語和希伯來語)和CJK(中日韓)。支援嵌套的區塊級元素(如P、DIV),

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )專業的PHP整合開發工具

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。