[Solaris] version 8, 9 & 10 => Scripts récu
Arno59
Messages postés
4753
Statut
Contributeur
-
Fabrice -
Fabrice -
Bonjour,
Je dois rechercher un maximum de données sur plusieurs serveurs pour comparaisons:
Ceux-ci tournent sur Sun Solaris (version 8 à 10).
Comment réaliser un script pour récupérer les informations suivantes :
Et aussi obtenir les resultat dans un fichier
[noc@id-***-priv1-a ~]$ ls -la /space1/local/progs/admin/etc
cat fticheck.conf
# Description du serveur
SERVICE=IDMP fr
FONCTION=Fonction priv
DESCRIPTION=Frontaux Production - Ville
# Module ignore
ignore tina_proc
# Nombre de process
PROC_TRIGGER=200
#Adresse mel
action conf email:
[noc@id-***-priv6-a etc]$ cat process.conf
--> Processus syslogd
ps -edf |grep /usr/sbin/syslogd
root 20191 19918 0 11:11 pts/1 00:00:00 grep /usr/sbin/syslogd
[noc@id-***-priv6-a etc]$ ps -edf
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Sep03 ? 00:00:04 init [3]
root 2 1 0 Sep03 ? 00:00:07 [migration/0]
root 3 1 0 Sep03 ? 00:00:00 [ksoftirqd/0]
root 4 1 0 Sep03 ? 00:00:08 [migration/1]
root 5 1 0 Sep03 ? 00:00:00 [ksoftirqd/1]
root 6 1 0 Sep03 ? 00:00:06 [migration/2]
root 7 1 0 Sep03 ? 00:00:00 [ksoftirqd/2]
root 8 1 0 Sep03 ? 00:00:07 [migration/3]
root 9 1 0 Sep03 ? 00:00:00 [ksoftirqd/3]
root 10 1 0 Sep03 ? 00:00:06 [migration/4]
root 11 1 0 Sep03 ? 00:00:00 [ksoftirqd/4]
root 12 1 0 Sep03 ? 00:00:07 [migration/5]
root 13 1 0 Sep03 ? 00:00:00 [ksoftirqd/5]
root 14 1 0 Sep03 ? 00:00:06 [migration/6]
root 15 1 0 Sep03 ? 00:00:00 [ksoftirqd/6]
root 16 1 0 Sep03 ? 00:00:07 [migration/7]
root 17 1 0 Sep03 ? 00:00:00 [ksoftirqd/7]
Je dois rechercher un maximum de données sur plusieurs serveurs pour comparaisons:
Ceux-ci tournent sur Sun Solaris (version 8 à 10).
Comment réaliser un script pour récupérer les informations suivantes :
Et aussi obtenir les resultat dans un fichier
[noc@id-***-priv1-a ~]$ ls -la /space1/local/progs/admin/etc
total 108 drwxr-xr-x 2 root noc 4096 Jul 20 11:06 . drwxr-xr-x 6 root noc 4096 Mar 27 16:31 .. -rw-r--r-- 1 root root 171 Dec 8 2005 chkinode.conf -rw-r--r-- 1 root root 171 Dec 8 2005 chkspace.conf -rw-r--r-- 1 root noc 252 Apr 2 13:53 fticheck.conf -rw-r--r-- 1 root root 151 Dec 8 2005 process.conf -rw-r--r-- 1 root root 20480 Mar 13 2007 toto.tar -rw-r--r-- 1 root root 8997 Jan 30 2007 xx_file_process.conf -rw-r--r-- 1 root root 8997 Jan 30 2007 xx_file_process.conf.apache -rw-r--r-- 1 root root 9008 Oct 30 2006 xx_file_process.conf.sav -rw-r--r-- 1 root noc 7783 Apr 19 2004 xx_file_process.conf.sy
cat fticheck.conf
# Description du serveur
SERVICE=IDMP fr
FONCTION=Fonction priv
DESCRIPTION=Frontaux Production - Ville
# Module ignore
ignore tina_proc
# Nombre de process
PROC_TRIGGER=200
#Adresse mel
action conf email:
[noc@id-***-priv6-a etc]$ cat process.conf
# Mettre les process a surveiller # syntaxe nom du process:nombre de process min:nombre de process max ntpd:1:2 syslogd:1:1 crond:1:50 sshd:1:50
--> Processus syslogd
ps -edf |grep /usr/sbin/syslogd
root 20191 19918 0 11:11 pts/1 00:00:00 grep /usr/sbin/syslogd
[noc@id-***-priv6-a etc]$ ps -edf
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Sep03 ? 00:00:04 init [3]
root 2 1 0 Sep03 ? 00:00:07 [migration/0]
root 3 1 0 Sep03 ? 00:00:00 [ksoftirqd/0]
root 4 1 0 Sep03 ? 00:00:08 [migration/1]
root 5 1 0 Sep03 ? 00:00:00 [ksoftirqd/1]
root 6 1 0 Sep03 ? 00:00:06 [migration/2]
root 7 1 0 Sep03 ? 00:00:00 [ksoftirqd/2]
root 8 1 0 Sep03 ? 00:00:07 [migration/3]
root 9 1 0 Sep03 ? 00:00:00 [ksoftirqd/3]
root 10 1 0 Sep03 ? 00:00:06 [migration/4]
root 11 1 0 Sep03 ? 00:00:00 [ksoftirqd/4]
root 12 1 0 Sep03 ? 00:00:07 [migration/5]
root 13 1 0 Sep03 ? 00:00:00 [ksoftirqd/5]
root 14 1 0 Sep03 ? 00:00:06 [migration/6]
root 15 1 0 Sep03 ? 00:00:00 [ksoftirqd/6]
root 16 1 0 Sep03 ? 00:00:07 [migration/7]
root 17 1 0 Sep03 ? 00:00:00 [ksoftirqd/7]
A voir également:
- [Solaris] version 8, 9 & 10 => Scripts récu
- Clé windows 8 - Guide
- Dernière version ccleaner gratuit français - Télécharger - Nettoyage
- Télécharger nero 10 version complète gratuit - Télécharger - Lecture
- Mixcraft 8 - Télécharger - Création musicale
- Restauration systeme windows 10 - Guide
1 réponse
Bonjour,
Je viens de voir ce message et j'ai eu à peu près le même soucis donc si je peux t'aider ou te diriger, enfin bref
Je te conseillerai de faire un petit script qui ressemblerai à celui-ci:
script_récup.sh
ssh (userxxx@serveuryyy) ". /home/(userxxx)/.profile execution du profile; ls -la /space1/local/progs/admin/etc ; cat fticheck.conf; ps -edf |grep /usr/sbin/syslogd"
Le tout que tu redirige dans un fichier que tu récupère grâce à une commande "scp" sur chaque serveur.
J'espère avoir pu ua moins te filer un petit coup de pouce n'étant pas moi même un expert unix...
Je viens de voir ce message et j'ai eu à peu près le même soucis donc si je peux t'aider ou te diriger, enfin bref
Je te conseillerai de faire un petit script qui ressemblerai à celui-ci:
script_récup.sh
ssh (userxxx@serveuryyy) ". /home/(userxxx)/.profile execution du profile; ls -la /space1/local/progs/admin/etc ; cat fticheck.conf; ps -edf |grep /usr/sbin/syslogd"
Le tout que tu redirige dans un fichier que tu récupère grâce à une commande "scp" sur chaque serveur.
J'espère avoir pu ua moins te filer un petit coup de pouce n'étant pas moi même un expert unix...