Sponsored Content
Special Forums IP Networking Unix Scripts & Counting TCP Connections Post 302102506 by sumitpandya on Thursday 11th of January 2007 12:59:44 AM
Old 01-11-2007
Perl will be better for this

As per my experience such logs are very bulky. Thus using ShellScript will be very slow and it will definately consume much higher CPU as well.

You can start with some good Perl Beginner book. It is very easy as syntax are in-between C and ShellScripting. Learning Perl for UNIX user have lot of advantage as well :-). I'd suggest you following books

Effective Perl Programming: Writing Better Programs With Perl
by Joseph N. Hall, Randal Schwartz

Learning Perl, Third Edition
by Randal L. Schwartz, Tom Phoenix

Go and buy from amazon 2nd hand hook sellers. Each will cost you less then 10$. Just 20$ expences against a prestigious Perl programmer ;-)
 

10 More Discussions You Might Find Interesting

1. Solaris

Scripts - Processes, CPU, Max. Connections

Hi all, Can any one please tell me how to find these in Unix (Commands) 1. Too many processes connected to the server. 2. High Utilization of CPU. 3. Maximum Number of connections with the database. OS: Sun Solaris 5.8 DB : Oracle 10g Thanks and Regards, Prashanth (1 Reply)
Discussion started by: prashanth_gs
1 Replies

2. Programming

C & TCP question: AF_INET vs AF_UNIX

Greetings! I am attempting to write a *basic* network client in C. I have manage to create a socket but I have doubts as far as using AF_INET vs AF_UNIX. At the present time, my client runs with AF_INET. Is AF_UNIX faster across hosts using the same OS flavor (Red Hat)? What is the difference... (1 Reply)
Discussion started by: Alan Christen
1 Replies

3. Shell Programming and Scripting

A bi directional script that will monitor the TCP/IP connections between two physical

Dear All , I'm looking for a unix script that will monitor the TCP/IP connections between two physical ip addresses and when it dectes an IP is down it generates an alarm and sends SMS to mobile numbers. Can any one help, I need this urgently. Waiting for positive replies.. ... (3 Replies)
Discussion started by: samura
3 Replies

4. Red Hat

How to kill all active tcp connections from an IP?

How to kill all active tcp connections from an IP? I am using CentOS (3 Replies)
Discussion started by: an00p
3 Replies

5. UNIX for Dummies Questions & Answers

syntax for counting & printing record count

Hi I have a complex script which outputs a text file for loading into a db. I now need to enhance this script do that I can issue an ‘lp' command to show the count of the number of records in this file. Can anybody give me the necessary syntax ? (2 Replies)
Discussion started by: malts18
2 Replies

6. IP Networking

How to test max number of tcp connections

Hello, I wanna test max tcp connection value. Please suggest how to do that. Thanks. (2 Replies)
Discussion started by: gstoychev
2 Replies

7. Shell Programming and Scripting

Help with awk array syntax & counting script

..... (3 Replies)
Discussion started by: elbee11
3 Replies

8. Shell Programming and Scripting

[Solved] Isolating & Counting IP from log file

Dear Community, today my website was under attack for several hours. 2 specific IPs make a tons of "get requests" to a specific page and apache server goes up and down. Now the problem is solved because I put in firewall blacklist these IPs, but I took a lot of time to analyze the apache log to... (6 Replies)
Discussion started by: Lord Spectre
6 Replies

9. IP Networking

Need to know reason for connections closed in netstat -p tcp

Hello netstat -p give below 6634176 connections as closed.How do we trace that which all connections are being closed on the server? 1366888371 data packet headers correctly predicted 1195906 connection requests 5227320 connection accepts 5992919... (6 Replies)
Discussion started by: Vishal_dba
6 Replies

10. UNIX for Advanced & Expert Users

30 tcp connections Established for a while and after a few minutes are close

Good morning, I need your help please After Restarting Aps or connection, these are connections tcp 0 0 10.80.1.26.57597 10.81.248.79.53008 ESTABLISHED tcp 0 47 10.80.1.26.57607 10.81.248.79.53008 ESTABLISHED tcp 0 0 ... (4 Replies)
Discussion started by: alexcol
4 Replies
Perl::Critic::Policy::Objects::ProhibitIndirectSyntax(3pUser Contributed Perl DocumentatPerl::Critic::Policy::Objects::ProhibitIndirectSyntax(3pm)

NAME
Perl::Critic::Policy::Objects::ProhibitIndirectSyntax - Prohibit indirect object call syntax. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Indirect object syntax is commonly used in other object-oriented languages for instantiating objects. Perl allows this, but to say that it supports it may be going too far. Instead of writing my $foo = new Foo; it is preferable to write my $foo = Foo->new; The problem is that Perl needs to make a number of assumptions at compile time to disambiguate the first form, so it tends to be fragile and to produce hard-to-track-down bugs. CONFIGURATION
Indirect object syntax is also hard for Perl::Critic to disambiguate, so this policy only checks certain subroutine calls. The names of the subroutines can be configured using the "forbid" configuration option: [Objects::ProhibitIndirectSyntax] forbid = create destroy The "new" subroutine is configured by default; any additional "forbid" values are in addition to "new". CAVEATS
The general situation can not be handled via static analysis. SEE ALSO
Perl::Critic::Policy::Dynamic::NoIndirect and indirect both do a better job with this, but they require that you compile/execute your code. AUTHOR
Thomas R. Wyant, III wyant at cpan dot org COPYRIGHT
Copyright (c) 2009-2011 Tom Wyant. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-07 Perl::Critic::Policy::Objects::ProhibitIndirectSyntax(3pm)
All times are GMT -4. The time now is 03:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy