Jump to content
Sign in to follow this  
Followers 0

Application: Linux System Script

71 posts in this topic

Posted

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

[IMG]http://www.haggistech.co.uk/ss/stats-V1.0.png[/IMG]
3 people like this

Share this post


Link to post
Share on other sites

Posted

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 [url="https://github.com/marcuswhybrow/minecraft-server-manager"]Minecraft Server Manager[/url]. (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 [url="http://ftp.de.debian.org/debian/pool/main/a/apt-build/apt-build_0.12.43.tar.gz"]apt-build source code[/url], for example, and take a look at [i]debian/changelog[/i] and [i]debian/README.Debian[/i] to see an example of more standard formatting.)
1 person likes this

Share this post


Link to post
Share on other sites

Posted

Cool thanks

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

Share this post


Link to post
Share on other sites

Posted

I tried this earlier Haggis under Fedora 18 Beta with Razor-QT as DE and for some reason I couldn't get it to work. Will try it again in a few when I reboot.

Share this post


Link to post
Share on other sites

Posted

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:

[url="http://cloudfront.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png"]http://cloudfront.om...ogo-kubuntu.png[/url] or [url="http://www.google.com/imgres?q=kubuntu+logo&um=1&hl=en&safe=active&client=firefox-a&sa=N&tbo=d&rls=org.mozilla:en-US:official&channel=fflb&biw=1633&bih=775&tbm=isch&tbnid=CMC2ld9kKilKGM:&imgrefurl=http://www.linuxdeli.com/linux_CD_kubuntu_64&docid=xbCVTCRfaUUc5M&imgurl=http://www.linuxdeli.com/image/cache/kubuntu_logo-500x500.jpg&w=500&h=500&ei=fIPHUKW2G4mH2AWjoID4Dw&zoom=1&iact=hc&vpx=1010&vpy=103&dur=1714&hovh=225&hovw=225&tx=150&ty=110&sig=112381489188606716575&page=1&tbnh=122&tbnw=122&start=0&ndsp=34&ved=1t:429,r:5,s:0,i:100&surl=1"]http://www.google.co...:0,i:100&surl=1[/url]

rather than the vanilla Ubuntu logo. :) Thanks!

Share this post


Link to post
Share on other sites

Posted

[quote name='Tyler R.' timestamp='1355253072' post='595384350']
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:

[url="http://cloudfront.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png"]http://cloudfront.om...ogo-kubuntu.png[/url] or [url="http://www.google.com/imgres?q=kubuntu+logo&um=1&hl=en&safe=active&client=firefox-a&sa=N&tbo=d&rls=org.mozilla:en-US:official&channel=fflb&biw=1633&bih=775&tbm=isch&tbnid=CMC2ld9kKilKGM:&imgrefurl=http://www.linuxdeli.com/linux_CD_kubuntu_64&docid=xbCVTCRfaUUc5M&imgurl=http://www.linuxdeli.com/image/cache/kubuntu_logo-500x500.jpg&w=500&h=500&ei=fIPHUKW2G4mH2AWjoID4Dw&zoom=1&iact=hc&vpx=1010&vpy=103&dur=1714&hovh=225&hovw=225&tx=150&ty=110&sig=112381489188606716575&page=1&tbnh=122&tbnw=122&start=0&ndsp=34&ved=1t:429,r:5,s:0,i:100&surl=1"]http://www.google.co...:0,i:100&surl=1[/url]

rather than the vanilla Ubuntu logo. :) Thanks!
[/quote]

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

[CODE]
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]
1 person likes this

Share this post


Link to post
Share on other sites

Posted

[quote name='Haggis' timestamp='1355243487' post='595383962']
Cool thanks

yeah i plan on continuing development so will look at github :)
[/quote]

If you haven't ever used git before, I suggest that you take a look at github's [url="http://learn.github.com/p/intro.html"]Introduction to Git[/url] tutorial. It is very good, in my opinion, and explains everything you will need to know to start using git.

[b]Edit:[/b] 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]I[/i] merge them I will still have a useless post immediately below the merged one since I can't delete posts!

Share this post


Link to post
Share on other sites

Posted

45 Downloads so far :)

Share this post


Link to post
Share on other sites

Posted

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

Unity:
[img]http://www.haggistech.co.uk/ss/stats/unity.png[/img]

Fedora and Openbox
[img]http://www.haggistech.co.uk/ss/stats/fedopenbox.png[/img]

Fedora and Gnome
[img]http://www.haggistech.co.uk/ss/stats/fedgnome.png[/img]

Fedora and LXDE
[img]http://www.haggistech.co.uk/ss/stats/fedlxde.png[/img]

Mint and Mate
[img]http://www.haggistech.co.uk/ss/stats/mintmate.png[/img]

Share this post


Link to post
Share on other sites

Posted

Updated: same link as previously

changelog included

Share this post


Link to post
Share on other sites

Posted

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

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

Share this post


Link to post
Share on other sites

Posted

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?

Share this post


Link to post
Share on other sites

Posted

Try running it with bash not sh

Share this post


Link to post
Share on other sites

Posted

yeah to run it cd into the Directory its in and do ./stats.sh

Share this post


Link to post
Share on other sites

Posted

I tried the above, and I get a blinking cursor. And no, I didn't edit it.

Share this post


Link to post
Share on other sites

Posted

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.

[code]
./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[/code]

Share this post


Link to post
Share on other sites

Posted

Finally works...

[CODE]

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


_,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:

Share this post


Link to post
Share on other sites

Posted

[quote name='Mindovermaster' timestamp='1356283826' post='595411420']Edit: Max, how'd you get 1001 Mb RAM? :huh:[/quote]
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 [i]think[/i] it reported similar.

[CODE]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.
[img]http://www.usedcpq.de/uploads/pics/cpq-ml370-da4200-572-mit-blitz_2_.jpg[/img]

Share this post


Link to post
Share on other sites

Posted

That thing like from the late 90's?

Share this post


Link to post
Share on other sites

Posted

[quote name='Mindovermaster' timestamp='1356292630' post='595411612']That thing like from the late 90's?[/quote]
Not [i]that[/i] 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.

Share this post


Link to post
Share on other sites

Posted

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

[quote name='Mindovermaster' timestamp='1356283826' post='595411420']
Finally works...


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

Edit: Max, how'd you get 1001 Mb RAM? :huh:
[/quote]


can you do me a favour

do these two commands

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

and

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

and paste me the output?
1 person likes this

Share this post


Link to post
Share on other sites

Posted

[quote name='Haggis' timestamp='1356299583' post='595411774']and paste me the output?[/quote]

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.

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

That's Ubuntu Server 12.04 LTS.

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

ok can you both do

[CODE]
lsb_release -a
[/CODE]

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

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

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.