View unanswered posts | View active topics It is currently Thu Jul 29, 2010 2:31 pm



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
 BBLogView 0.0.3 
Author Message
BBWise
User avatar

Joined: Fri Mar 10, 2006 11:34 am
Posts: 72
Location: Finland
Reply with quote
Post BBLogView 0.0.3
Here's a mod of ysuke's BBMemo 0.0.5 plugin. It's a kind of inverted version for geeks like me, that constantly need to read some log files.

Instead of autosaving a file like BBMemo, BBLogView will autoread a file when ever (and only if) it has changed. It will read a user-settable size chunk from the end of the file instead of the whole file. So you'll always be seeing the newest lines at the end of a logfile and the reading won't take ages. You can also set the path to the file to be read (relative or absolute).

Other than that, and saving being disabled completely, it's pretty much the same old bbmemo. Happy logging! :)

CHANGELOG

0.0.3 [2007-03-29]
- Fixed a bug where file was read incorrectly if filePath changed
- Made mousewheel work also without scrollbars

0.0.2 [2007-03-29]
- Initial release


Attachments:
File comment: BBLogView 0.0.3 + source
bbLogView.zip [24.23 KiB]
Downloaded 280 times


Last edited by UnkHz on Fri Mar 30, 2007 9:29 pm, edited 2 times in total.

Thu Mar 29, 2007 8:53 pm
Report this post
Profile
Sponsored Links
Google Adsense


BBSage
User avatar

Joined: Mon Jan 24, 2005 4:36 am
Posts: 94
Reply with quote
Post 
Sweet! Now I have a BB-Native way to show my Folding@Home info. Thanx! \:D/


Fri Mar 30, 2007 5:46 am
Report this post
Profile WWW
Moderator
User avatar

Joined: Sat Dec 11, 2004 12:06 am
Posts: 1310
Location: Violent Paradise
Reply with quote
Post 
Back when I had time to play around with things, I was hoping for something like this to use with a Python script that would parse an RSS feed to a plain text file that could be read and displayed bbStyled on the desktop.

Maybe in a few months I might be able to come up with some other uses for this as well but right now it's work - work - work :/

This can be quite useful IMO, thanks UnkHz!

_________________
I'll have the roast duck... with mango sauce and a large helping of BB4Win Wiki: http://wiki.bb4win.org/wiki/Main_Page


Fri Mar 30, 2007 6:53 am
Report this post
Profile
Moderator
User avatar

Joined: Sun Dec 05, 2004 10:08 pm
Posts: 775
Location: LA, US
Reply with quote
Post 
If anyone has any other innovative ideas on how to use this, please don't hesitate to share.

I'd like a setup like linux's tail where I could watch specific ports.

Would be l33t.

_________________
My blackbox styles


Tue Apr 03, 2007 9:34 pm
Report this post
Profile WWW
Moderator
User avatar

Joined: Sat Dec 11, 2004 12:06 am
Posts: 1310
Location: Violent Paradise
Reply with quote
Post 
cthu1hu wrote:
If anyone has any other innovative ideas on how to use this, please don't hesitate to share.

I'd like a setup like linux's tail where I could watch specific ports.

Would be l33t.


OK, this is probably a bit more broad than being specifically what you want cthu1hu but you can already get something like what you are thinking of using the built-in M$ program NETSTAT.

Typing 'netstat /?' at a command prompt displays the following:
Code:
Displays protocol statistics and current TCP/IP network connections.

NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval]

  -a            Displays all connections and listening ports.
  -b            Displays the executable involved in creating each connection or
                listening port. In some cases well-known executables host
                multiple independent components, and in these cases the
                sequence of components involved in creating the connection
                or listening port is displayed. In this case the executable
                name is in [] at the bottom, on top is the component it called,
                and so forth until TCP/IP was reached. Note that this option
                can be time-consuming and will fail unless you have sufficient
                permissions.
  -e            Displays Ethernet statistics. This may be combined with the -s
                option.
  -n            Displays addresses and port numbers in numerical form.
  -o            Displays the owning process ID associated with each connection.
  -p proto      Shows connections for the protocol specified by proto; proto
                may be any of: TCP, UDP, TCPv6, or UDPv6.  If used with the -s
                option to display per-protocol statistics, proto may be any of:
                IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
  -r            Displays the routing table.
  -s            Displays per-protocol statistics.  By default, statistics are
                shown for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6;
                the -p option may be used to specify a subset of the default.
  -v            When used in conjunction with -b, will display sequence of
                components involved in creating the connection or listening
                port for all executables.
  interval      Redisplays selected statistics, pausing interval seconds
                between each display.  Press CTRL+C to stop redisplaying
                statistics.  If omitted, netstat will print the current
                configuration information once.

You can redirect the output from the default device (the command prompt screen) to a file using '> [path to the file]'

EXAMPLES:

The command:

netstat -e > c:\netstat.txt

creates an ASCII text file named 'netstat.txt' with contents similar to the following:
Code:
Interface Statistics

                           Received            Sent

Bytes                      25614373        16304926
Unicast packets               56349           53451
Non-unicast packets             232             238
Discards                          0               0
Errors                            0               1
Unknown protocols                 0

If you run it with an interval on the end of the command it will append the file on the interval. For example:

netstat -e 1 > c:\netstat.txt

creates an ASCII text file named 'netstat.txt' with contents similar to the following (appended once every second):
Code:
Interface Statistics

                           Received            Sent

Bytes                      27108330        17261864
Unicast packets               61562           58507
Non-unicast packets             254             260
Discards                          0               0
Errors                            0               1
Unknown protocols                 0
Interface Statistics

                           Received            Sent

Bytes                      27108330        17261864
Unicast packets               61562           58507
Non-unicast packets             254             260
Discards                          0               0
Errors                            0               1
Unknown protocols                 0
Interface Statistics

                           Received            Sent

Bytes                      27108330        17261864
Unicast packets               61562           58507
Non-unicast packets             254             260
Discards                          0               0
Errors                            0               1
Unknown protocols                 0

(...etc.)

Now if you set bbLogView to read only the last 10 lines of text from 'netstat.txt' every second you have created network traffic monitor.

To create a port monitor, use the -a argument. For example:

netstat -a 1 > c:\netstat.txt

creates an ASCII text file named 'netstat.txt' with contents similar to the following (appended once every second):
Code:
Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    xerxes:epmap           xerxes:0               LISTENING
  TCP    xerxes:microsoft-ds    xerxes:0               LISTENING
  TCP    xerxes:1028            xerxes:0               LISTENING
  TCP    xerxes:1044            localhost:1045         ESTABLISHED
  TCP    xerxes:1045            localhost:1044         ESTABLISHED
  TCP    xerxes:1048            localhost:1049         ESTABLISHED
  TCP    xerxes:1049            localhost:1048         ESTABLISHED
  TCP    xerxes:3210            localhost:12080        ESTABLISHED
  TCP    xerxes:3214            localhost:12080        ESTABLISHED
  TCP    xerxes:3218            localhost:12080        ESTABLISHED
  TCP    xerxes:3239            localhost:12080        ESTABLISHED
  TCP    xerxes:12025           xerxes:0               LISTENING
  TCP    xerxes:12080           xerxes:0               LISTENING
  TCP    xerxes:12080           localhost:3210         ESTABLISHED
  TCP    xerxes:12080           localhost:3214         ESTABLISHED
  TCP    xerxes:12080           localhost:3218         ESTABLISHED
  TCP    xerxes:12080           localhost:3239         ESTABLISHED
  TCP    xerxes:12110           xerxes:0               LISTENING
  TCP    xerxes:12119           xerxes:0               LISTENING
  TCP    xerxes:12143           xerxes:0               LISTENING
  TCP    xerxes:netbios-ssn     xerxes:0               LISTENING
  TCP    xerxes:3211            eo-in-f104.google.com:http  ESTABLISHED
  TCP    xerxes:3215            eo-in-f104.google.com:http  ESTABLISHED
  TCP    xerxes:3219            wr-in-f99.google.com:http  ESTABLISHED
  TCP    xerxes:3240            kc-in-f104.google.com:http  ESTABLISHED
  TCP    xerxes:netbios-ssn     xerxes:0               LISTENING
  TCP    xerxes:netbios-ssn     xerxes:0               LISTENING
  UDP    xerxes:microsoft-ds    *:*                   
  UDP    xerxes:isakmp          *:*                   
  UDP    xerxes:1025            *:*                   
  UDP    xerxes:1143            *:*                   
  UDP    xerxes:1144            *:*                   
  UDP    xerxes:1147            *:*                   
  UDP    xerxes:4500            *:*                   
  UDP    xerxes:ntp             *:*                   
  UDP    xerxes:1900            *:*                   
  UDP    xerxes:ntp             *:*                   
  UDP    xerxes:netbios-ns      *:*                   
  UDP    xerxes:netbios-dgm     *:*                   
  UDP    xerxes:1900            *:*                   
  UDP    xerxes:ntp             *:*                   
  UDP    xerxes:netbios-ns      *:*                   
  UDP    xerxes:netbios-dgm     *:*                   
  UDP    xerxes:1900            *:*                   
  UDP    xerxes:ntp             *:*                   
  UDP    xerxes:netbios-ns      *:*                   
  UDP    xerxes:netbios-dgm     *:*                   
  UDP    xerxes:1900            *:*                   

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    xerxes:epmap           xerxes:0               LISTENING
  TCP    xerxes:microsoft-ds    xerxes:0               LISTENING
  TCP    xerxes:1028            xerxes:0               LISTENING
  TCP    xerxes:1044            localhost:1045         ESTABLISHED
  TCP    xerxes:1045            localhost:1044         ESTABLISHED
  TCP    xerxes:1048            localhost:1049         ESTABLISHED
  TCP    xerxes:1049            localhost:1048         ESTABLISHED
  TCP    xerxes:3210            localhost:12080        ESTABLISHED
  TCP    xerxes:3214            localhost:12080        ESTABLISHED
  TCP    xerxes:3218            localhost:12080        ESTABLISHED
  TCP    xerxes:3239            localhost:12080        ESTABLISHED
  TCP    xerxes:12025           xerxes:0               LISTENING
  TCP    xerxes:12080           xerxes:0               LISTENING
  TCP    xerxes:12080           localhost:3210         ESTABLISHED
  TCP    xerxes:12080           localhost:3214         ESTABLISHED
  TCP    xerxes:12080           localhost:3218         ESTABLISHED
  TCP    xerxes:12080           localhost:3239         ESTABLISHED
  TCP    xerxes:12110           xerxes:0               LISTENING
  TCP    xerxes:12119           xerxes:0               LISTENING
  TCP    xerxes:12143           xerxes:0               LISTENING
  TCP    xerxes:netbios-ssn     xerxes:0               LISTENING
  TCP    xerxes:3211            eo-in-f104.google.com:http  ESTABLISHED
  TCP    xerxes:3215            eo-in-f104.google.com:http  ESTABLISHED
  TCP    xerxes:3219            wr-in-f99.google.com:http  ESTABLISHED
  TCP    xerxes:3240            kc-in-f104.google.com:http  ESTABLISHED
  TCP    xerxes:netbios-ssn     xerxes:0               LISTENING
  TCP    xerxes:netbios-ssn     xerxes:0               LISTENING
  UDP    xerxes:microsoft-ds    *:*                   
  UDP    xerxes:isakmp          *:*                   
  UDP    xerxes:1025            *:*                   
  UDP    xerxes:1143            *:*                   
  UDP    xerxes:1144            *:*                   
  UDP    xerxes:1147            *:*                   
  UDP    xerxes:4500            *:*                   
  UDP    xerxes:ntp             *:*                   
  UDP    xerxes:1900            *:*                   
  UDP    xerxes:ntp             *:*                   
  UDP    xerxes:netbios-ns      *:*                   
  UDP    xerxes:netbios-dgm     *:*                   
  UDP    xerxes:1900            *:*                   
  UDP    xerxes:ntp             *:*                   
  UDP    xerxes:netbios-ns      *:*                   
  UDP    xerxes:netbios-dgm     *:*                   
  UDP    xerxes:1900            *:*                   
  UDP    xerxes:ntp             *:*                   
  UDP    xerxes:netbios-ns      *:*                   
  UDP    xerxes:netbios-dgm     *:*                   
  UDP    xerxes:1900            *:*                   

(...etc.)

You can slim this down to just the TCP connections by just stipulating the protocal. For example:

netstat -p tcp 1 > c:\netstat.txt

creates an ASCII text file named 'netstat.txt' with contents similar to the following (appended once every second):
Code:
Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    xerxes:1044            localhost:1045         ESTABLISHED
  TCP    xerxes:1045            localhost:1044         ESTABLISHED
  TCP    xerxes:1048            localhost:1049         ESTABLISHED
  TCP    xerxes:1049            localhost:1048         ESTABLISHED

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    xerxes:1044            localhost:1045         ESTABLISHED
  TCP    xerxes:1045            localhost:1044         ESTABLISHED
  TCP    xerxes:1048            localhost:1049         ESTABLISHED
  TCP    xerxes:1049            localhost:1048         ESTABLISHED

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    xerxes:1044            localhost:1045         ESTABLISHED
  TCP    xerxes:1045            localhost:1044         ESTABLISHED
  TCP    xerxes:1048            localhost:1049         ESTABLISHED
  TCP    xerxes:1049            localhost:1048         ESTABLISHED

(...etc.)


Further Thoughts

bbLogView opens up a whole new can of worms IMO. Even the most novice student of C\C++ learns how to take the data that is normally sent to STDOUT (the display) and write it to a file. They really don't have to understand a lot about the BBAPI to create a DLL that blackbox.exe can load and unload. They don't have to create menus or a window or any of the other stuff that most plugins do. Just create a text file and overwrite\append it periodically and have an instance of bbLogView read it.

For instance, creating a digital clock would almost be a no-brainer.

And if someone posted a DLL template for this kind of plugin, even very novice C\C++ students would be thinking up all kinds of data to collect and write to a text file.

_________________
I'll have the roast duck... with mango sauce and a large helping of BB4Win Wiki: http://wiki.bb4win.org/wiki/Main_Page


Wed Apr 04, 2007 12:09 pm
Report this post
Profile
Moderator
User avatar

Joined: Sun Dec 05, 2004 10:08 pm
Posts: 775
Location: LA, US
Reply with quote
Post 
You are one badass mofo.

I've always wanted something like this for my desktop.

_________________
My blackbox styles


Wed Apr 04, 2007 4:48 pm
Report this post
Profile WWW
BBAdult

Joined: Sat Feb 25, 2006 6:29 pm
Posts: 32
Reply with quote
Post 
@UnkHz: good plugin! thanks.

@cthu1hu: also all of these prety much can be tried:
http://support.microsoft.com/kb/927229
and from here PsTools (PsInfo, PsList, PsLogList v2.64)
http://www.microsoft.com/technet/sysinternals/utilities/psloglist.mspx
http://www.microsoft.com/technet/sysinternals/SystemInformation/PsTools.mspx

_________________
satori


Mon Apr 09, 2007 3:28 am
Report this post
Profile
Boy meets Box
User avatar

Joined: Fri Dec 29, 2006 2:47 am
Posts: 623
Location: in front of the monitor.
Reply with quote
Post 
Sweet. Finally something better than samurize to show todo.txt...;)

One thing though...It would be nice if you could set the background to fully transparent, like samurize...and also if you could turn off edges AND border.

Other than that sweet plugin. :D

_________________
attack of the mini-man!
bb4win FAQs
mini-man-land


Wed Apr 18, 2007 10:34 pm
Report this post
Profile YIM WWW
Moderator
User avatar

Joined: Sun Dec 05, 2004 10:08 pm
Posts: 775
Location: LA, US
Reply with quote
Post 
UnkHz:

Could you release your own version of bbmemo that allows mouse scrolling without the scrollbar?

_________________
My blackbox styles


Sat Apr 21, 2007 4:25 pm
Report this post
Profile WWW
Sponsored Links
Google Adsense


Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.