Application: Linux System Script


Recommended Posts

Hey Guys and Girls

I have been writing a little system script and have finally got to a point where i want to release it to you all

Uploaded it to my own site so i can see how many downloads it gets

Thanks

please feel free to download it and let others know about it

Download Here: http://www.haggistech.co.uk/downloads/download.php?file=stats-V1.0.tar.gz

stats-V1.0.png

  • Like 3
Link to comment
https://www.neowin.net/forum/topic/1125048-application-linux-system-script/
Share on other sites

First off, I really like the script! You have done a really great job with it.

I have a suggestion, though. If you plan on continuing development, you might consider putting it on github. That will allow other contributors to more easily get involved and both developers and users to see a concrete changelog. A more succinct changelog and readme might also be helpful. If you want a template for a much more complex BASH script that is already on github and implements both a changelog and readme, check out the github page for Minecraft Server Manager. (Although MSM's changelog and readme are in markdown format, you don't necessarily have to do that. In fact, most open-source projects implement their documentation in plain text. Download the apt-build source code, for example, and take a look at debian/changelog and debian/README.Debian to see an example of more standard formatting.)

  • Like 1

Great job Haggis! This is great! One thing tho: How could I make a text based logo? I'd really like the Kubuntu logo, like this:

http://cloudfront.om...ogo-kubuntu.png or http://www.google.co...:0,i:100&surl=1

rather than the vanilla Ubuntu logo. :) Thanks!

I used jp2a to create the ascii-art logos. You can create one from the first logo you linked to as follows:


sudo apt-get install jp2a
wget http://cloudfront.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png
convert logo-kubuntu.png logo-kubuntu.jpg
# Resize your terminal window to reflect the approximate of the ascii-art drawing you want to create.
jp2a logo-kubuntu.jpg > logo-kubuntu.txt
cat logo-kubuntu.txt # This command is optional if you don't need to see the image in terminal.
[/CODE]

Cool thanks

yeah i plan on continuing development so will look at github :)

If you haven't ever used git before, I suggest that you take a look at github's Introduction to Git tutorial. It is very good, in my opinion, and explains everything you will need to know to start using git.

Edit: What happened? I thought the post editor merged successive posts by the same user if they were made relatively quickly. I can still edit both posts, but even if I merge them I will still have a useless post immediately below the merged one since I can't delete posts!

ok i updated it a little as it was not always picking up Debian and not always Mate and Unity

Unity:

unity.png

Fedora and Openbox

fedopenbox.png

Fedora and Gnome

fedgnome.png

Fedora and LXDE

fedlxde.png

Mint and Mate

mintmate.png

I'm no Linux pro, but when I type sh stats.sh, I get this:


stats.sh: 59: stats.sh: function: not found
[/CODE]

I put the bash file in my home directory.

Edit: Ok, now I'm getting this:

[CODE]
stats.sh: 59: stats.sh: function: not found
grep: .local/share/Trash/files/.Xauthority: Permission denied
grep: .fluxbox: Permission denied
grep: .screenlayout/davidsetup1.sh: Permission denied

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


_,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._
`$$$$

stats.sh: 184: stats.sh: function: not found
Screenshot being taken.....Smile!!
Screenshot Saved as /home/david/Screenshot_20121223.0855.png
stats.sh: 193: stats.sh: function: not found
grep: .local/share/Trash/files/.Xauthority: Permission denied
grep: .fluxbox: Permission denied
grep: .screenlayout/davidsetup1.sh: Permission denied
stats.sh: 213: stats.sh: function: not found
stats.sh: 234: stats.sh: function: not found
stats.sh: 261: stats.sh: function: not found
stats.sh: 293: [: cinnamon: unexpected operator
stats.sh: 296: [: cinnamon: unexpected operator
stats.sh: 324: stats.sh: function: not found
stats.sh: 326: stats.sh: Syntax error: "}" unexpected
[/CODE]

I will have a look

did you edit the file because the screenshot bit is not enabled in the file i uploaded and i redownloaded it and checked and still not enabled

I have installed Cinnamon and dont get any errors

anyone else getting this?

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

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
[/CODE]

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

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

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[/CODE]

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.

cpq-ml370-da4200-572-mit-blitz_2_.jpg

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.

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
[/CODE]

and

[CODE]
ls /etc/ | grep version
[/CODE]

and paste me the output?

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.


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

That doesn't look right...

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

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • The government is not the good guy either. You propose 99% of people require that the government overreach and govern their freedom of information and privacy, while ignoring the government is made up 100% of people, of which 99% are (as you described) brain dead. You can't have both. The reality is Signal is absolutely right and the government is doing what it has always done. Ignoring that we are their boss and grabbing all the power they possibly can to make sure we aren't. Your (societies) ###### parenting is not reason enough as to why I can't have a safe platform for my data/information. Thinking the government is helping is precisely what they are targeting psychologically to take suckers like you for a ride. "Think of the children" was, has, is, and will always be a mechanism of control. In the rare occasion it's actually essential the mass consensus has always been there and it doesn't become a debate.
    • Google Chrome 149.0.7827.103 (offline installer) by Razvan Serea The web browser is arguably the most important piece of software on your computer. You spend much of your time online inside a browser: when you search, chat, email, shop, bank, read the news, and watch videos online, you often do all this using a browser. Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. Use one box for everything--type in the address bar and get suggestions for both search and Web pages. Thumbnails of your top sites let you access your favorite pages instantly with lightning speed from any new tab. Desktop shortcuts allow you to launch your favorite Web apps straight from your desktop. Chrome has many useful features built in, including automatic full-page translation and access to thousands of apps, extensions, and themes from the Chrome Web Store. Google Chrome is one of the best solutions for Internet browsing giving you high level of security, speed and great features. Important to know! The offline installer links do not include the automatic update feature. Download web installer: Google Chrome Web 32-bit | Google Chrome 64-bit | Freeware Download: Google Chrome Offline Installer 64-bit | Direct Link | 131.0 MB Download: Google Chrome Offline Installer 32-bit | Direct Link | 119.0 MB Download page: Google Chrome Portable Download: Chrome ARM64 | Direct Link View: Chrome Website | Release Notes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Apple would rather delay Siri AI than open iOS to rival assistants in the EU by Pradeep Viswanathan At WWDC 2026, Apple today announced a revamped Siri AI experience for iOS and iPadOS users. However, this new Siri AI experience will not be available on iPhones and iPads in the European Union when iOS 27 and iPadOS 27 launch later this year. In a detailed press release, Apple blamed the Siri delay on the EU’s Digital Markets Act, highlighting that EU regulators did not accept its proposed solutions for bringing Siri AI to the region. Consequently, there is currently no timeline for Siri AI’s availability on iOS and iPadOS in the EU. Here is what EU users will be missing due to this delay: Siri AI, Apple’s next-generation assistant powered by Apple Intelligence A new dedicated Siri app for revisiting conversations Expanded Visual Intelligence features Integrated AI-assisted writing tools Siri mode in Camera on iOS Other system-level AI features Since the new Siri experience on watchOS 27 is dependent on an iOS 27 device, EU users will also miss out on Siri AI on watchOS 27. The most frustrating part is that even developers based in the EU will not be able to test or use the new Siri AI features for their apps on iOS 27, iPadOS 27, and watchOS 27. In its press release, Apple mentioned that making Siri AI available in the EU would require the company to give other AI assistants (like ChatGPT, Claude, and Gemini) broad access to private user data and the ability to control installed apps. Essentially, the EU wants competing AI systems to be able to read and send messages, make purchases, access files, and perform actions across apps. To address these concerns, Apple proposed an intermediary system called Trusted System Agent. This system would have allowed other virtual assistants to access the same features as Siri AI in a safer way. However, the European Commission rejected Apple's proposals, and it is currently unclear why. The good news is that Apple stated it will continue working with EU regulators to bring Siri AI to the region. For now, however, iPhone and iPad users in the EU will have to wait. If platform gatekeepers such as Apple and Google reserve deep operating system capabilities only for their own AI assistants, rival services such as ChatGPT, Claude, Perplexity, and others will be at a major disadvantage. Modern AI assistants are no longer simple chatbots. They require access to core OS-level capabilities such as reading on-screen context, interacting with installed apps, sending messages, creating calendar events, managing files, and completing user-approved actions across the device. If only Siri on iOS or Gemini on Android can access these capabilities, competing AI services will struggle to offer the same level of convenience, even if their underlying models are better. This is exactly what the European Union's DMA is trying to address. Apple and Google should be allowed to protect user privacy and security, but they should not be permitted to use those concerns as a blanket excuse to block rival AI assistants from getting fair access to core platform features. A secure permission-based framework could allow users to choose their preferred AI assistant without giving any company unrestricted access to personal data.
    • Firefox 151.0.4 by Razvan Serea Firefox is a fast, full-featured Web browser. It offers great security, privacy, and protection against viruses, spyware, malware, and it can also easily block pop-up windows. The key features that have made Firefox so popular are the simple and effective UI, browser speed and strong security capabilities. Firefox has complete features for browsing the Internet. It is very reliable and flexible due to its implemented security features, along with customization options. Firefox includes pop-up blocking, tab-browsing, integrated Google search, simplified privacy controls, a streamlined browser window that shows you more of the page than any other browser and a number of additional features that work with you to help you get the most out of your time online. Firefox key features Enhanced Tracking Protection (ETP) – Blocks trackers, cookies, cryptominers, and fingerprinters by default. Private Browsing Mode – Deletes history, cookies, and temporary files when closed. Lightweight & Fast Performance – Optimized memory usage with efficient page loading. Cross-Platform Sync – Sync bookmarks, passwords, history, and open tabs across devices. Customizable Interface – Toolbars, themes, and extensions can be tailored to user needs. Strong Privacy Controls – Options to manage cookies, permissions, and site data easily. Reader Mode – Strips away clutter for distraction-free reading. Pocket Integration – Save and read articles offline with Pocket built into Firefox. Picture-in-Picture (PiP) – Watch videos in a floating window while multitasking. Extensions & Add-ons – Vast library for productivity, security, and personalization. Built-in PDF Viewer – No need for external software to view PDFs. Firefox Monitor – Alerts users if their email is part of a known data breach. Multi-Account Containers – Isolate browsing sessions (e.g., work, personal, shopping). Performance & Resource Efficiency – Uses fewer system resources than some competitors. Open Source & Community-Driven – Transparent development with global contributions. Download: Firefox 64-bit | Firefox 32-bit | ARM64 | ~70.0 MB (Freeware) Download: Firefox for MacOS | 145.0 MB View: Firefox Home Page | Release Notes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Very Popular
      Captain_Eric earned a badge
      Very Popular
    • One Month Later
      amusc earned a badge
      One Month Later
    • One Month Later
      DJC50PLUS earned a badge
      One Month Later
    • Week One Done
      DJC50PLUS earned a badge
      Week One Done
    • Proficient
      Eric Biran went up a rank
      Proficient
  • Popular Contributors

    1. 1
      +primortal
      509
    2. 2
      PsYcHoKiLLa
      222
    3. 3
      ATLien_0
      92
    4. 4
      +Edouard
      86
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!