[Ilugc] doubt on ssh connection

2010-04-05 Thread venkat raman
hai techies,
would pls any one sort out the following questions...

 1.how do we restart the 20  apache servers within 2 minutes using
ssh connection.

 2.how do we find out how many connections established to mysql
database or apache server(number of hits)

 3.when we using the top command on what basis it will give priority
to display the process

 4.main difference between linux filesystem vs windows filesystem

 5.how do we filter the warning log message from /var/log/maillog

 6.Is it necessary  a windows user having id in linux box for
accesing a file using in samba server

 7.Default block size in linux

8. A system has 2 nic cards..how do we check which one is up or
which one is down
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] doubt on ssh connection

2010-04-05 Thread Bharathi Subramanian
 1.how do we restart the 20  apache servers within 2 minutes
 using ssh connection.

script it with password-less SSH.

 3.when we using the top command on what basis it will give
 priority to display the process

By default, based on CPU utilization. But you can change this using
top's interactive commands. Read man top.

 4. main difference between linux filesystem vs windows

Linux use single Hierarchical FS, which starts with /. Windoz follow
multiple hierarchical FS and each one linked with a drive(C,D,..).

 5. how do we filter the warning log message from
 /var/log/maillog

Use grep with appropriate pattern and redirect the output to an
another file.

 7.Default block size in linux

FS Block size is variable. By default 4096.

 8. A system has 2 nic cards. how do we check which one is up

Use ifconfig or ip command and use the Mac to identify the NIC.

Bye :)
-- 
Bharathi S
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] doubt on ssh connection

2010-04-05 Thread subhojit ojha
I think U got the most of ur question's answer

 7.Default block size in linux


for finding default block size, u can see this command with o/p

*tune2fs -l /dev/sda1 | grep Block*
Block count:  4980736
Block size:   4096
Blocks per group: 32768
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] doubt on ssh connection

2010-04-05 Thread Girish Venkatachalam
On Mon, Apr 5, 2010 at 2:47 PM, venkat raman infoappu.li...@gmail.com wrote:
 hai techies,
                would pls any one sort out the following questions...

         1.how do we restart the 20  apache servers within 2 minutes using
 ssh connection.

On different machines? Why do you want to do it? Not a good idea.

In case you want to do it, setup automatic keying by

$ ssh-keygen -t rsa
(give no password)
$ cat ~/.ssh/id_rsa.pub | ssh remote cat  ~/.ssh/authorized_keys

And start ssh-agent -s like this in case you use bash. `ssh-agent -s`

This is the hard part. You should see

$ ssh-add -l

should list your key fingerprint.

Then your automated login is working. Then write a simple script like this.

for i in `cat machines`
do
ssh $i apachectl restart

done

That is it.

         2.how do we find out how many connections established to mysql
 database or apache server(number of hits)

Apache log contains everything. access.log. There are several
visualizers and log
analyzers out there. A simple grep can also take you there.

mysql I dunno. A lot of LUGGies use it. Ask them.

         3.when we using the top command on what basis it will give priority
 to display the process

top does not assign priorities. OS assigns. Read up the nice command.

Lower the number, higher the priority.

         4.main difference between linux filesystem vs windows filesystem


I dunno how to answer this one. I have not gone deep into either.

A file system should be judged by its ability to perform well with many small
files or few large files and not tire the hard disk.

It should also recover from crashes well. Linux file system was
immature but with
time it is improving I think.

As to Windoze, of course it is worse than linux. When I say Linux file
systems are
 not up to the mark I mean in relation to absolute terms or with other superior
file systems.

Well I am too ignorant to comment any further.

         5.how do we filter the warning log message from /var/log/maillog


Use grep -v.

         6.Is it necessary  a windows user having id in linux box for
 accesing a file using in samba server

No.

         7.Default block size in linux


Used to 512 bytes. Not sure about now. You can easily find it out.

        8. A system has 2 nic cards..how do we check which one is up or
 which one is down

Just look at the LEDs. If you see a green and an amber light glowing on one,
you know it is up.

-Girish

-- 
Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] doubt on ssh connection

2010-04-05 Thread Sai Kiran Kanuri
On Mon, Apr 5, 2010 at 2:47 PM, venkat raman infoappu.li...@gmail.com
wrote:

 1.how do we restart the 20  apache servers within 2 minutes using
 ssh connection.


You might want to look at FUNC. but this would need initial setup.

https://fedorahosted.org/func/

alternatively u can go the SSH path. setup key based logins  any simple
script should do.



 2.how do we find out how many connections established to mysql
 database or apache server(number of hits)

netstat might be a simple way. I am not sure if MYSQL let's u query that.



 3.when we using the top command on what basis it will give
priority
 to display the process

CPU, but you can change the sorting order.. check manpage

 5.how do we filter the warning log message from /var/log/maillog

One way is you can setup your syslog to log the messages to a different
file. the default Syslog/rsyslog, doesn't offer you much room, you can look
at syslog-ng. It is pretty good  might just meet you requirement.


 6.Is it necessary  a windows user having id in linux box for
 accesing a file using in samba server

No


 7.Default block size in linux

4K i guess. Not sure

8. A system has 2 nic cards..how do we check which one is up or
 which one is down

ethtool


- Kiran
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] doubt on ssh connection

2010-04-05 Thread LinuXpert Academy

8. A system has 2 nic cards..how do we check which one is up or
 which one is down

ethtool

Also try, mii-tool -v  (both your NICs should support MII).

S. Baskar
CEO/LinuXpert Systems


___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] doubt on ssh connection

2010-04-05 Thread Deepan Chakravarthy

         2.how do we find out how many connections established to mysql
 database or apache server(number of hits)
use apachetop
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc