Jump to content



Photo

Application: Linux System Script


  • Please log in to reply
70 replies to this topic

#16 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 20
  • Joined: 20-February 11
  • OS: Windows 7/8.1, BSD Unix, Arch Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 23 December 2012 - 16:59

Just for giggles tossed the script onto one of my servers. (Don't laugh at the specs, it's an old first gen Proliant rackmount ML370.. dual P3's and 1GB memory, whee.. I hate throwing stuff away.) This particular one is Ubuntu 12.04 LTS, no X or a DE. Just passing on a couple of errors to you Haggis.

./stats.sh: line 240: xdpyinfo: command not found
./stats.sh: line 311: mate-session: command not found


			  ..''''''..
		  .;::::::::::::::;.
	   .;::::::::::::::'.':::;.
	 .;::::::::;,'..';.   .::::;.
	.:::::::,.,.	  ....:::::::.
   .:::::::.   :;::::,.   .:::::::.
   ;::::::   .::::::::::.   ::::::;
   :::.  .'  ::::::::::::...,::::::
   :::.  .'  ::::::::::::...,::::::
   ;::::::   .::::::::::.   ::::::;
   .:::::::.   :,;::;,.   .:::::::.
	.:::::::;.;.	  ....:::::::.
	  ;::::::::;,'..';.   .::::;
	   .;::::::::::::::'.':::;.
		  .,::::::::::::::,.
			  ...''''...


			  _,met$$$$$gg.
		   ,g$$$$$$$$$$$$$$$P.
		 ,g$$P$$	   $$$Y$$.$.
		,$$P`			  `$$$.
	   ,$$P	   ,ggs.	 `$$b:
	   d$$`	 ,$P$`   .	$$$
	   $$P	  d$`	 ,	$$P
	   $$:	  $$.   -	,d$$`
	   $$;	  Y$b._   _,d$P`
	   Y$$.	 .`$Y$$$$P$`
	   `$$b	  $-.__
		`Y$$b
		 `Y$$.
		   `$$b.
			 `Y$$b.
			   `$Y$b._
				   `$$$$


	OS: Debian
	Hostname: server7
	CPU: Pentium III (Coppermine)
	RAM (used / total): 118 / 1001 Mb
	Desktop Enviroment: Not Found
	Logged in as: root
	Kernel: 3.2.0-35-generic-pae
	Resolution:  pixels
	Load Averages: 0.21, 0.11, 0.06
	Top Process (by memory use): /usr/sbin/mysqld



#17 Mindovermaster

Mindovermaster

    Neowinian Senior

  • Tech Issues Solved: 13
  • Joined: 25-January 07
  • Location: /USA/Wisconsin/
  • OS: Debian Jessie
  • Phone: Samsung Galaxy SIII

Posted 23 December 2012 - 17:30

Finally works...

									  
			  ..''''''..			  
		  .;::::::::::::::;.		  
	   .;::::::::::::::'.':::;.	  
	 .;::::::::;,'..';.   .::::;.	
	.:::::::,.,.	  ....:::::::.	
   .:::::::.   :;::::,.   .:::::::.  
   ;::::::   .::::::::::.   ::::::;  
   :::.  .'  ::::::::::::...,::::::  
   :::.  .'  ::::::::::::...,::::::  
   ;::::::   .::::::::::.   ::::::;  
   .:::::::.   :,;::;,.   .:::::::.  
	.:::::::;.;.	  ....:::::::.	
	  ;::::::::;,'..';.   .::::;	  
	   .;::::::::::::::'.':::;.	  
		  .,::::::::::::::,.		  
			  ...''''...			  
									  
									  
			  _,met$$$$$gg.		  
		   ,g$$$$$$$$$$$$$$$P.		
		 ,g$$P$$	   $$$Y$$.$.	  
		,$$P`			  `$$$.	  
	   ,$$P	   ,ggs.	 `$$b:	
	   d$$`	 ,$P$`   .	$$$	  
	   $$P	  d$`	 ,	$$P	  
	   $$:	  $$.   -	,d$$`	  
	   $$;	  Y$b._   _,d$P`		
	   Y$$.	 .`$Y$$$$P$`		  
	   `$$b	  $-.__				
		`Y$$b						
		 `Y$$.						
		   `$$b.					  
			 `Y$$b.				  
			   `$Y$b._				
				   `$$$$			  
									  
	OS: Debian
	Hostname: david-ubuntu
	Uptime: 3 days, 21:39 hours
	CPU: Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz
	RAM (used / total): 3298 / 7968 Mb
	Desktop Enviroment: Cinnamon 1.6.7
	Logged in as: david
	Kernel: 3.5.0-21-generic
	Resolution: 3520x1200 pixels
	Load Averages: 1.81, 1.34, 1.15
	Top Process (by memory use): java

Running Ubuntu 12.10, though, unsure why its saying Debian.

Edit: Max, how'd you get 1001 Mb RAM? :huh:

#18 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 20
  • Joined: 20-February 11
  • OS: Windows 7/8.1, BSD Unix, Arch Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 23 December 2012 - 17:53

Edit: Max, how'd you get 1001 Mb RAM? :huh:

Not 100% positive.. I'm very rusty on EISA systems, only ever owned one or two in my lifetime (hate the things, they're a pain in the butt).. reasonably sure it shows 1024MB on POST, can't say for sure as it's not had a monitor attached in months, and not in the mood to wrestle that 5000 pound steel gorilla out of its rack to check. Most likely it's video memory (video's on the motherboard), could always be something to do with EISA too, not positive. But 1001 is what's being reported by the OS. Had Server 2003 before that.. I think it reported similar.

root@server2:~# uname -a
Linux server7 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686 i686 i386 GNU/Linux

root@server7:~# free -t -m
             total    used    free    shared   buffers    cached
Mem:          1001     505     496	   0	    37       338
-/+ buffers/cache:     129     871
Swap:         1021	 0    1021
Total:        2023     505    1518

Not mine, random shot I found via Bing, but same model. Sucker weighs a ton and you need earplugs when the cooling system is running full blast. First few minutes are deafening until the cooling system drivers kick in and turn it down a few hundred decibels... I inherited 5 of the things from a friend of mine, and I hate throwing hardware away.
Posted Image

#19 Mindovermaster

Mindovermaster

    Neowinian Senior

  • Tech Issues Solved: 13
  • Joined: 25-January 07
  • Location: /USA/Wisconsin/
  • OS: Debian Jessie
  • Phone: Samsung Galaxy SIII

Posted 23 December 2012 - 19:57

That thing like from the late 90's?

#20 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 20
  • Joined: 20-February 11
  • OS: Windows 7/8.1, BSD Unix, Arch Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 23 December 2012 - 20:03

That thing like from the late 90's?

Not that old but a dinosaur as far as computers go, erm around 2002 I think is when these were considered new. Only reason I kept them is for the hardware RAID arrays (way too big to fit in a standard chassis and generates a crapton of heat without some major cooling), otherwise I'd have scrapped them.

#21 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 23 December 2012 - 21:53

Thanks for the error guys i will look into those

obviously not picking up debian correctly again

the xdpy one is nice and easy to fix its throwing then due to you not running X server :)

the mate session again just need some error checking on it lol

Finally works...


Running Ubuntu 12.10, though, unsure why its saying Debian.

Edit: Max, how'd you get 1001 Mb RAM? :huh:



can you do me a favour

do these two commands

ls /etc/ | grep release

and

ls /etc/ | grep version

and paste me the output?

#22 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 20
  • Joined: 20-February 11
  • OS: Windows 7/8.1, BSD Unix, Arch Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 23 December 2012 - 21:58

and paste me the output?


Tossing mine in there even though you're asking the other guy, mine was showing Debian too (along with two logos) so /shrug there it is, maybe it helps.

root@server7:~# ls /etc/ | grep release
-rw-r--r--   1 root root     106 Aug  2 12:20 lsb-release
-rw-r--r--   1 root root     141 Oct 23 18:04 os-release

root@server7:~# ls /etc/ | grep version
-rw-r--r--   1 root root      11 Apr 19  2012 debian_version

That's Ubuntu Server 12.04 LTS.

#23 Mindovermaster

Mindovermaster

    Neowinian Senior

  • Tech Issues Solved: 13
  • Joined: 25-January 07
  • Location: /USA/Wisconsin/
  • OS: Debian Jessie
  • Phone: Samsung Galaxy SIII

Posted 23 December 2012 - 22:09

david@david-ubuntu:~$ ls /etc/ | grep release
lsb-release
os-release
david@david-ubuntu:~$ ls /etc/ | grep version
debian_version

That doesn't look right...

#24 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 23 December 2012 - 22:29

ok can you both do

lsb_release -a

for some reason Ubuntu carried over the /etc/debian_version file

so i will need to find another way to do this lol

#25 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 20
  • Joined: 20-February 11
  • OS: Windows 7/8.1, BSD Unix, Arch Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 23 December 2012 - 22:37

root@server7:~# uname -a

Linux server7 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686 i686 i386 GNU/Linux



root@server7:~# lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description:    Ubuntu 12.04.1 LTS

Release:        12.04

Codename:       precise



root@server7:~# cat /etc/debian_version

wheezy/sid


#26 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 23 December 2012 - 23:36

Awesome can you try this one

http://www.haggistec...k/ostest.tar.gz

its the same stats file inside just modified

#27 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 20
  • Joined: 20-February 11
  • OS: Windows 7/8.1, BSD Unix, Arch Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 23 December 2012 - 23:46

Awesome can you try this one

Little better, picked up the distro name this time correctly, although still showing both Ubuntu and Debian ASCII art. Note a new line of text from lsb_release above the two errors.

root@server7:~# ./stats.sh
No LSB modules are available.
./stats.sh: line 242: xdpyinfo: command not found
./stats.sh: line 313: mate-session: command not found


              ..''''''..
          .;::::::::::::::;.
       .;::::::::::::::'.':::;.
     .;::::::::;,'..';.   .::::;.
    .:::::::,.,.      ....:::::::.
   .:::::::.   :;::::,.   .:::::::.
   ;::::::   .::::::::::.   ::::::;
   :::.  .'  ::::::::::::...,::::::
   :::.  .'  ::::::::::::...,::::::
   ;::::::   .::::::::::.   ::::::;
   .:::::::.   :,;::;,.   .:::::::.
    .:::::::;.;.      ....:::::::.
      ;::::::::;,'..';.   .::::;
       .;::::::::::::::'.':::;.
          .,::::::::::::::,.
              ...''''...


              _,met$$$$$gg.
           ,g$$$$$$$$$$$$$$$P.
         ,g$$P$$       $$$Y$$.$.
        ,$$P`              `$$$.
       ,$$P       ,ggs.     `$$b:
       d$$`     ,$P$`   .    $$$
       $$P      d$`     ,    $$P
       $$:      $$.   -    ,d$$`
       $$;      Y$b._   _,d$P`
       Y$$.     .`$Y$$$$P$`
       `$$b      $-.__
        `Y$$b
         `Y$$.
           `$$b.
             `Y$$b.
               `$Y$b._
                   `$$$$


    OS: Ubuntu 12.04.1 LTS
    Hostname: server7
    CPU: Pentium III (Coppermine)
    RAM (used / total): 173 / 1001 Mb
    Desktop Enviroment: Not Found
    Logged in as: root
    Kernel: 3.2.0-35-generic-pae
    Resolution:  pixels
    Load Averages: 0.31, 0.14, 0.07
    Top Process (by memory use): /usr/sbin/mysqld


#28 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 23 December 2012 - 23:58

yeah the NO LSB modules is just because nothing is installed maybe due to X not being there but not sure


sorry to ask again but can you try this one

http://www.haggistec...untutest.tar.gz

#29 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 20
  • Joined: 20-February 11
  • OS: Windows 7/8.1, BSD Unix, Arch Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 24 December 2012 - 00:03

yeah the NO LSB modules is just because nothing is installed maybe due to X not being there but not sure
sorry to ask again but can you try this one

Heh I'd suspect not too many people with server-only installs are going to worry about this sort of script anyway, I was just trying it out of curiosity. It's not a bother, not doing anything important today. I see you got the stray Debian logo out of it this time.

root@server7:~# ./stats.sh
No LSB modules are available.
./stats.sh: line 242: xdpyinfo: command not found
./stats.sh: line 313: mate-session: command not found


			  ..''''''..
		  .;::::::::::::::;.
	   .;::::::::::::::'.':::;.
	 .;::::::::;,'..';.   .::::;.
	.:::::::,.,.	  ....:::::::.
   .:::::::.   :;::::,.   .:::::::.
   ;::::::   .::::::::::.   ::::::;
   :::.  .'  ::::::::::::...,::::::
   :::.  .'  ::::::::::::...,::::::
   ;::::::   .::::::::::.   ::::::;
   .:::::::.   :,;::;,.   .:::::::.
	.:::::::;.;.	  ....:::::::.
	  ;::::::::;,'..';.   .::::;
	   .;::::::::::::::'.':::;.
		  .,::::::::::::::,.
			  ...''''...


	OS: Ubuntu 12.04.1 LTS
	Hostname: server7
	CPU: Pentium III (Coppermine)
	RAM (used / total): 173 / 1001 Mb
	Desktop Enviroment: Not Found
	Logged in as: root
	Kernel: 3.2.0-35-generic-pae
	Resolution:  pixels
	Load Averages: 0.20, 0.08, 0.06
	Top Process (by memory use): /usr/sbin/mysqld


#30 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 24 December 2012 - 00:15

dude can you do

echo $display

and let me know what it says