Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, August 9, 2018

Favorite powershell command of the moment

Get-Content "file path" -wait

It's the Linux equivalent of    tail -f "file path"

Great for watching log files.   Easy to use.   Easy to test.

Yay for good powershell commands.

Saturday, April 4, 2015

Speaking of Java and MySQL

So, I finally got my Java/MySQL connection working.

Hooray!


https://help.ubuntu.com/community/JDBCAndMySQL

Was where I learned to fix the "class not found issue".

After that, I dug up http://www.tutorialspoint.com/jdbc/jdbc-quick-guide.htm to get instructions on how to use/connect to the database.

Afterwards, I was capable of spitting out information to the system console from the database.  Holy crud!  

Definitely making progress today.

Yay.

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.


Thursday, February 14, 2013

Obfuscation



I've heard various complaints about Windows and Linux systems.  I'm a Windows based user as that is what most of my job uses.  The rest is proprietary junk that has limited access.  One of the big complaints about the newer versions of Windows was that the directory system was obfuscated.  Meaning: you used to know where something installed, but now it just kind of shows up and goes somewhere. 

Strangely enough, when comparing Ubuntu 12.04, you have exactly the same thing.  Seriously...   I've been looking for the last 15 minutes through the file system and can't find where TeamViewer installed.  All I want to do is figure that out, and then maybe I can get it to start on boot up like I want so I don't have a fear of updating the computer.  See, if I want to mess with something remotely, I generally use my iPhone to connect to the Ubuntu machine to ping something to determine if the device in question has network connectivity through our corporate VPN to the site router and through the site switch, down to the device.   It's a good "is networking for this device working as expected?" test. 

But I don't dare install updates unless I'm here babysitting the machine because I can't get TeamViewer to start manually.  Because I can't find where the program installed.  And I finally found it.   Now, it could be because I'm using a more Windows style interface that things are complicated.  But that's pretty crazy...   also, why isn't my system auto logging in anymore?  I prefer it that way because I use it for remote access.  

Just as I think I've got one problem solved, here come 10 more.  And all this is stuff I already know how to do in Windows...   Maybe it's time to head home for the day and fight this problem later.