Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Thursday, March 21, 2013

Bashing around

While I'm stuck at my desk for several hours, with my computer bogged down with several remote desktop connections, I thought I'd slide over to my Ubuntu box and start messing with things.   I mean, I've got nothing better to do that sit and stare at bars that slowly move across the screen to indicate progress.  Really, I don't.  

But then automation is not something that has been properly built into the company I work for.  As we expand and grow (as we are doing right now) we haven't taken any time to develop and use tools that provide monitoring or automation for almost anything.  The only way we currently know if something goes down is a phone call from a store.   That's a backwards process. 

Slowly but surely, parts are building their selves into automation and remote management, but not at a pace that it should be happening.  I think as a company we've entered the 21st century, but there's a ton of stuff that needs to be done.  Far too much is fly by night, hope like hell it works.

Maybe I'm talking about pro-activity as opposed to reactivity.  I'm not terribly sure.  I just know the way we are doing things is not the right way to do them.  Too much legacy junk that serves only small purpose without providing much.  But someone decided we need to keep all that stuff.  Great.  Have fun. 

So I don't know how to do it in Windows...  maybe there's a way to do it in Linux.  People tell me its the greatest thing since sliced bread, and even better than peanut oil.   So off I am, to design and automate an entire network using nothing but Bash scripts and a Window's users knowledge of Linux....   Am I a glutton for punishment or what?

Monday, March 4, 2013

The end of education and Bash!



So, I think I'm done messing with education for a while.  I think the Khan Academy has just about everything I wanted out of basic education for a while.  Or at least it seems it does.  There is still the issue of examining what they are teaching and what sort of bent they have.  With math, it's fairly easy to not have a political ideology, but with other subjects it's always hard.  Even listening to the TED talk from Salman Khan, the founder of Khan Academy, he seemed to think his work at a hedge fund wasn't really work with a meaningful end.

All creation and transfer of money is meaningful work.  Behind that hedge fund are a lot of different peoples' lives.  In effect, the job of that hedge fund is to help provide a future for all the investors that put money into the hedge fund.  On top of that, thousands of small companies need the stock purchases from the hedge fund in order to get working capital to grow and expand.  See?  The hedge fund provides a service towards all sorts of people.  Where there is a need, the need will be fulfilled. 

The second thing I've been messing with is writing BASH scripts for a Ubuntu box sitting on my desk.  I'm kind of working at creating some sort of automated tool to report network status, even if the report isn't up to the minute.  Kind of like a good way to see if large portions of the network keep falling off or having problems.  I guess it's that random desire of all system administrators to know what is going on or to have some place to look in case emergencies happen.  Maybe an attempt to be proactive instead of reactive.

And the script generally works, I just can't get the darn array to work.  And I suppose that would be okay if I wasn't completely lazy, but I am.  And I want the thing to be simple to modify.  Instead of having to type every single line and IP address out numerous times, I simply want to create a list IP addresses once and update/modify that quickly and simply by adding/changing one line.  

But right now I have to modify 3 lines, and if removing those 3 lines involves removing a store, it involves re-indexing potentially a lot of arrays.  Estimating 3 per location and 63 locations that would be an adjustment of 180 some odd array values.   That's unacceptable.

But I did get the array to work while thinking about all this mess.  So that's a bit of progress.  Next thing is to set up a job to transfer the contents of my www folder to the etc/www folder on a periodic basis...   Sounds like some fun.