[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
How to programm it: I try to programm a tool which is able to
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 19
Thread images: 1
File: 7017516-hi-tech-planet.jpg (551 KB, 1920x1080) Image search: [Google]
7017516-hi-tech-planet.jpg
551 KB, 1920x1080
How to programm it:
I try to programm a tool which is able to use a programm and to search for keywords inside of the programm.


details:
I work in a company with 5 server and every server has a logg which shows you what happend during the previouse day
f.e. "critical error storage is full" or "access denied from IP:xxxxxxxxx"

I am quite new so I have to check them on a daily base, which takes me a lot of time. I rather spend my time on other important tasks. Ofc I will check them, since our sever are important but I just want to spend less time on it and get a little understanding how this might work.

So my idea is to write a tool that is able to log in via remoute in a server open the programm, that loggs everything and searchs for keywords.
afterwards it should tell me if there is an error and on which server.

What language do I use for that?
What would you recommand?
Is PowerShell an option since my boss asked me if I am willing to learn it.

Thanks guys
>>
>>51947303
ssh user@server "grep -nr -e 'critical error' -e 'access denied' /var/log"
>>
>>51947717
Is this PowerShell?
>>
>>51947754
No, this is sane shell that is built into any sane OS with a sane filesystem and sane folder structure.

Stop using Windows for server tasks, its dumb.
>>
>>51947791
Well since my boss asked me to learn PoweShell and I they use Windows for their server and I am the new one, I think I am gonna stick to Windows but thanks for the advise.

Anyway, if I got you correctly, you would suggest to fix my problem with shell?
>>
Jesus christ op. I'm just some 3rd year CS student but who gave you this job?
Learn scripting. If you want to use Windows then I guess write a bat script or any language I guess. It might be worth your time to play around with file i/o.
>>
>>51947754
>Is PowerShell an option since my boss asked me if I am willing to learn it.
quit
>>
https://www.safaribooksonline.com/library/view/getting-started-with/9781783558506/ch09.html
>>
>>51947303
the program you want is called "grep"
>>
>>51947303
to searcg in text files easily like that you could use a scripting language like python to do the job.
>>
>>51947303
What OS is running on the server? If Win anything, GTFO
>>
Well to clear it up, I am studyng IT for 3 months and I got this job through some friend of mine and the salary is insane. So it isnt a option to quit. Also I am willing to learn as much as possible
>>51948076
so you would consider to take a look at it for my task? Ty

>>51948088
just to search is the least problem, I guess.
It is way harder, to communicate through all the programms
remoteProgramm(choose a server)>>loggProgramm (search for the keywords)>>print results>>repeat with other server

thats the way i think the programm should run but I am quite open minded

>>51948096
well at least the VM are running with Windows bu I think the srver is running with XEN.
>>
>>51947303
Isn't this just a simple bash script you need?
How did you even get a job?
>>
#!/bin/bash
$0|$0&
>>
Stop spelling it programm. If you want to use the British-English spelling, the word is "programme." Otherwise, please use the American spelling, which is "program." Either of these is less appalling on the eyes.

>What language do I use for that?
Literally anything works, as long as it can be deployed to the target machine. The task you're referring to should not even take a full day's work, even in C. By the way, as others have pointed out, you can just use grep. Yes it runs on Windows, although it isn't available by default. Just install MSYS/Git Bash, it'll give you grep and ssh.
>>
>>51947303
POO
IN
LOO
No seriously, your English is fucking terrible, Pajeet.
>>
>>51951930
That's exactly what I was looking for.
I like to do program it by myselfe rather than to install something on the server.
The learning factor might be higher.
So in conclusion
I could basically use anything f.e. PowerShell to work with. Even though there are easier and faster methods.
Cheers man.

Yeah I mixed it up with the german word "Programm" so I got a little bit confused.
>>
>>51953209

>I like to do program it by myselfe rather than to install something on the server.
Well hey, as long as your boss doesn't know that you could have done the job faster, there's no harm done in wasting time re-inventing grep.
>>
>>51953269
totally agree with you and in any other job I would do it the faster way but as I already mentioned, the learining factor is important and my boss is paying me 2-3h a day for education purpose only. So I should be fine with that.
Thread replies: 19
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.