Feeds:
Posts
Comments

Archive for the ‘Solaris’ Category

Despite all the wonderful text-oriented and processing tools in UNIX, one tool is surprisingly absent: an ability to generate some kind of text-based graph from an input stream. This would be useful for all sorts of things, but most notably for “eye-balling” the relative frequencies of similar data-sets. Such data-sets could be: logs of every sort, file-types in a directory, version control statistics, etc. The graph could be a simple thing, such as dashes that take up to the width of the current TTY. But as far as I could tell, no such tool exists.

Until now.

So here I present a step-by-step instruction on how to write such a tool in Perl. If you are hasty, you can simply download the the tool, rename it to just “histogram”, make it executable, and put it in your bin directory.

In the posts that follow, I’ll detail its usage and construction.

Here’s a quick example usage and output:

$ histogram ‘/ sshd\[[0-9]*\]: Connection closed by UNKNOWN/ { print substr($3,1,2) }’ /var/log/secure*
00:———————————————————————-
01:————————————————————————–
02:—————————————————————————
03:————————————————————————–
04:————————————————————————–
05:—————————————————————————
06:—————————————————————————
07:—————————————————————————–
08:—————————————————————————-
09:————————————————————————-
10:—————————————————————————-
11:—————————————————————————
12:———————————————————————–
13:————————————————————————-
14:——————————————-
15:—————————————
16:———————————–
17:————————————-
18:————————————–
19:————————————
20:————————————-
21:————————————
22:—————————————-
23:————————————–
What we’re trying to do here is get an idea how many times hackers are trying to penetrate the system with SSH attempts. So we use awk to look through the /var/log/secure logs for a string like “sshd … Connection closed by UNKNOWN” and print out the hour of the day each time the message occurred. Histogram then does the rest and prints out a “graph” so we can get an idea of the distribution of attack times — were they in the morning, the afternoon, all day, or what? In this case, it seems from midnight to about 2pm.

Advertisements

Read Full Post »

Short Description :: Please provide Memory config of the server solaris

Solution ::
1. Login to the server
2. Execute “prtdiag -v” and search for ‘Memory Configuration’ or execute “prtconf -v | grep -i Mem”

Example,

root@tsunami:/root : prtdiag -v
System Configuration: Sun Microsystems sun4u Sun SPARC Enterprise M5000 Server
System clock frequency: 1012 MHz
Memory size: 131072 Megabytes
============================ Memory Configuration ============================
LSB Memory_Group Available_Size Memory_Status DIMM_Size #_of_DIMMs Mirror_Mode Interleave_Factor
— —— —————— ——- —— —– ——- ———-
00 A 65536MB okay 4096MB 16 no 8-way
00 B 65536MB okay 4096MB 16 no 8-way

root@tsunami:/root : prtconf -v | grep -i Mem
Memory size: 131072 Megabytes

Read Full Post »


Read Full Post »

* Basically Multipathing is a fault-tolerance & performance enhancement technique where there will be more than one physical paths between the computer and its storage devices through the buses, controllers & switches. The product/software released by EMC for this purpose is EMC powerpath.

First of all to use this software it needs to be installed and it can be downloaded from powerlink website . Once it is installed and configured below are some of the commands for the administration purpose.

* When new luns are added, to check the newly added luns

#/etc/powermt display

#/etc/powermt display dev=all

If it does not recognizes then

#devfsadm % This takes the luns to OS control.

To Make the configuration changes

#/etc/powermt config

To save the changes

#/etc/powermt save

To see all the devices and the logical device ID’S of the disk

#/etc/powermt display dev=all | more

To remove Failed devices & all the old device entries

#/etc/powermt check

It shows the failed devices and asks whether to delete the failed ones. For example

Warning: xxxxxxx device path c25t7d6 is currently dead.

Do you want to remove it (y/n/a/q)? y enter.

Read Full Post »