Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Script analisi sistema?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Dhaki
Guru
Guru


Joined: 16 Jun 2004
Posts: 325
Location: Ticino - CH

PostPosted: Sat Nov 20, 2004 4:27 pm    Post subject: Script analisi sistema? Reply with quote

Allora, mi sono chiesto uno di questi giorni: non sarebbe pratico uno script che raccolga quante più informazioni sul proprio sistema ( e che proponga migliorie :P). Oppure semplicemente potrebbe essere usato proprio sul forum, per far raccogliere informazioni velocemente. Cioé qualcosa del genere:
Code:
$ analisi.sh --gcc --make.conf --lspci

Che quindi dia un output relativo. Cioé, magari vi sembrerà inutile... In questo caso almeno potremmo fare una raccolta di programmi per listare una serie di dati sul proprio sistema (per esempio lspci). Cosa ne dite?
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sat Nov 20, 2004 4:50 pm    Post subject: Reply with quote

credo che relativamente al make.conf, alexbr stesse facendo un parser.
per raccogliere info basta semplicemente fare un parser.
basta sapere che genere di info van raccolte.
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30965
Location: here

PostPosted: Sat Nov 20, 2004 6:01 pm    Post subject: Reply with quote

Forse non centra nulla ma ho trovato questo script di uno sviluppatore che controlla se le USE flags impostate sono ancora valide
Code:
#!/bin/sh

PORTDIR=$(portageq envvar PORTDIR)
USE_desc=$(grep ^[a-zA-Z] ${PORTDIR}/profiles/use.desc | awk '{print $1}')
USE_local_desc=$(grep ^[a-zA-Z] ${PORTDIR}/profiles/use.local.desc | cut -d : -f 2- | awk '{print $1}' )
USE_sorted=$(echo $USE_local_desc $USE_desc | tr ' ' '\n' | sort -u )
USE_flags=$(portageq envvar USE)
for use_flag in $USE_flags ; do
        ok=0;
        for use_valid in $USE_sorted ; do
                [ "$use_flag" = "$use_valid" ] && ok=1
        done
        [ $ok -ge 1 ] || echo $use_flag is invalid
done

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
_sys/sid
Guru
Guru


Joined: 27 Aug 2004
Posts: 346
Location: Asola (Mantova)

PostPosted: Sat Nov 20, 2004 6:12 pm    Post subject: Reply with quote

emerge info
Da' molte informazioni sul sistema...
poi c'e' anche dev-php/phpsysinfo che da' informazioni hardware...

emerge info
Code:

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r4 i686)
=================================================================
System uname: 2.6.9-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Sidney Base System Version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="..."


PHP SYS INFO
Code:

Hardware Information

Processors   2
Model   Intel(R) Pentium(R) 4 CPU 2.60GHz
Chip MHz   2600.77
Cache Size   512 KB
System Bogomips   10338.29
PCI Devices   Silicon Integrated Systems [SiS] 5513 [IDE]
Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet
Creative Labs SB Live! EMU10k1
Creative Labs SB Live! MIDI/Game Port
ALi Corporation SmartLink SmartPCI561 56K Modem
nVidia Corporation NV34 [GeForce FX 5200]
IDE Devices   hda: Maxtor 6Y080L0 (Capacity: 76.34 GB)
hdc: DVD-ROM BDV316C
hdd: 40X12
SCSI Devices   ATAPI CD-R/RW 40X12 ( CD-ROM )

poi ci sono tutte le informazioni relative alle memorie (RAM, SWAP e HD (fs ecc))
_________________
http://th30z.netsons.org/
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Sat Nov 20, 2004 6:56 pm    Post subject: Reply with quote

[quote="fedeliallalinea"]Forse non centra nulla ma ho trovato questo script di uno sviluppatore che controlla se le USE flags impostate sono ancora valide

Code:
casa01 ale # ./checkuse
3dnow is invalid
casa01 ale # euse -i 3dnow
3dnow [+] [C] [G] Adds support for 3dnow multimedia processor instructions
casa01 ale #

non deve funzionare tanto bene...
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum