- 论坛徽章:
- 0
|
服务器启动后使用的log文件,会在短时间内生成大量的log记录(大概5分钟内4万条记录)
每条log的形式大概为: "the device id is $id and the server ip is $ipaddress"
例如段时间内生成这样的log:
---------------------------------------------------------------------
the device id is 1 and the server ip is 10.1.1.1
the device id is 2 and the server ip is 10.1.1.2
the device id is 3 and the server ip is 10.1.1.3
the device id is 4 and the server ip is 10.1.1.4
the device id is 5 and the server ip is 10.1.1.5
the device id is 6 and the server ip is 10.1.1.6
the device id is 7 and the server ip is 10.1.1.7
the device id is 8 and the server ip is 10.1.1.8
....
....
the device id is 400000 and the server ip is 10.253.1.8
------------------------------------------------------------------------
我想实现perl实时获取生成的log,并把$id和$ipaddress 获取到存入内存hash。
我知道实现上述功能并不难,我的疑惑就在于如果这些实时的log是在短时间内生成的,例如每秒3000条,perl能处理的了吗,请高手指点一下思路吧
|
|