npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ping-logs-cli

v1.0.3

Published

handle ping logs cli

Readme

fixpoint-programming-exam

環境構築

DevContainerを利用

$ git clone https://github.com/ieieiei59/fixpoint-programming-exam.git
$ cd fixpoint-programming-exam
$ code .

上記コマンド実行後、devcontainerを起動し、VSCodeのターミナルから以下コマンドを実行

$ yarn install

その他の方法

$ git clone https://github.com/ieieiei59/fixpoint-programming-exam.git
$ cd fixpoint-programming-exam
$ yarn install

実行方法

$ npm install -g ping-logs-cli
$ ping-logs-cli logs strict <log-file-path>

or

$ npx ping-logs-cli logs strict path/to/log-file

プログラム構成

docs/ARCHITECTURE.md に記載

実行結果

設問1

$ cat example-logs/strict/default.log 
20201019133124,10.20.30.1/16,-
20201019133125,10.20.30.2/16,1
20201019133134,192.168.1.1/24,10
20201019133135,192.168.1.2/24,-
20201019133224,10.20.30.1/16,522
20201019133225,10.20.30.2/16,1
20201019133234,192.168.1.1/24,8
20201019133235,192.168.1.2/24,15
20201019133324,10.20.30.1/16,-
20201019133325,10.20.30.2/16,2

$ ping-logs-cli logs strict example-logs/strict/default.log 
 Address        Period                                                  
 ────────────── ─────────────────────────────────────────────────────── 
 10.20.30.1/16  2020年10月19日13時31分24秒 ~ 2020年10月19日13時32分24秒 
 10.20.30.1/16  2020年10月19日13時33分24秒 ~ 現在                       
 192.168.1.2/24 2020年10月19日13時31分35秒 ~ 2020年10月19日13時32分35秒

設問2

$ cat example-logs/check/default.log 
20201019133124,10.20.30.1/16,-
20201019133125,10.20.30.2/16,-
20201019133134,192.168.1.1/24,10
20201019133135,192.168.1.2/24,-
20201019133224,10.20.30.1/16,522
20201019133225,10.20.30.2/16,-
20201019133234,192.168.1.1/24,8
20201019133235,192.168.1.2/24,15
20201019133324,10.20.30.1/16,-
20201019133325,10.20.30.2/16,-
20201019133424,10.20.30.1/16,-
20201019133425,10.20.30.2/16,2

$ ping-logs-cli logs check -n 2 example-logs/check/default.log 
 Address       Period                                                  
 ───────────── ─────────────────────────────────────────────────────── 
 10.20.30.1/16 2020年10月19日13時33分24秒 ~ 現在                       
 10.20.30.2/16 2020年10月19日13時31分25秒 ~ 2020年10月19日13時34分25秒

 $ ping-logs-cli logs check -n 3 example-logs/check/default.log 
 Address       Period                                                  
 ───────────── ─────────────────────────────────────────────────────── 
 10.20.30.2/16 2020年10月19日13時31分25秒 ~ 2020年10月19日13時34分25秒

設問3

$ cat example-logs/high-load/default.log 
20201019133124,10.20.30.1/16,100
20201019133125,10.20.30.2/16,1
20201019133134,192.168.1.1/24,103
20201019133135,192.168.1.2/24,102
20201019133224,10.20.30.1/16,522
20201019133225,10.20.30.2/16,1
20201019133234,192.168.1.1/24,9
20201019133235,192.168.1.2/24,15
20201019133324,10.20.30.1/16,105
20201019133325,10.20.30.2/16,2
20201019133334,192.168.1.1/24,400
20201019133335,192.168.1.2/24,15

$ ping-logs-cli logs high-load -t 100 -m 1 example-logs/high-load/default.log 
 Address        Period                                                  
 ────────────── ─────────────────────────────────────────────────────── 
 10.20.30.1/16  2020年10月19日13時31分24秒 ~ 現在                       
 192.168.1.1/24 2020年10月19日13時31分34秒 ~ 2020年10月19日13時32分34秒 
 192.168.1.1/24 2020年10月19日13時33分34秒 ~ 現在                       
 192.168.1.2/24 2020年10月19日13時31分35秒 ~ 2020年10月19日13時32分35秒

$ ping-logs-cli logs high-load -t 100 -m 2 example-logs/high-load/default.log 
 Address       Period                            
 ───────────── ───────────────────────────────── 
 10.20.30.1/16 2020年10月19日13時31分24秒 ~ 現在

$ ping-logs-cli logs high-load -t 10 -m 2 example-logs/high-load/default.log 
 Address        Period                            
 ────────────── ───────────────────────────────── 
 10.20.30.1/16  2020年10月19日13時31分24秒 ~ 現在 
 192.168.1.2/24 2020年10月19日13時31分35秒 ~ 現在

設問4

$ cat example-logs/check-subnet/default.log 
20201019133124,10.20.30.1/16,-
20201019133125,10.20.30.2/16,-
20201019133134,192.168.1.1/24,10
20201019133135,192.168.1.2/24,-
20201019133224,10.20.30.1/16,522
20201019133225,10.20.30.2/16,-
20201019133234,192.168.1.1/24,8
20201019133235,192.168.1.2/24,-
20201019133324,10.20.30.1/16,-
20201019133325,10.20.30.2/16,-
20201019133424,10.20.30.1/16,-
20201019133425,10.20.30.2/16,-

$ ping-logs-cli logs check-subnet -n 2 example-logs/check-subnet/default.log 
 Subnet                    Period                                                  
 ───────────────────────── ─────────────────────────────────────────────────────── 
 10.20.0.0 ~ 10.20.255.255 2020年10月19日13時31分24秒 ~ 2020年10月19日13時32分24秒 
 10.20.0.0 ~ 10.20.255.255 2020年10月19日13時32分25秒 ~ 現在

$ ping-logs-cli logs check-subnet -n 3 example-logs/check-subnet/default.log 
 Subnet                    Period                            
 ───────────────────────── ───────────────────────────────── 
 10.20.0.0 ~ 10.20.255.255 2020年10月19日13時32分25秒 ~ 現在