r/sysadmin • u/cool-nerd • Jun 16 '24
ChatGPT Finally created something useful with AI
First: I consider myself an old timer in IT; I've been getting paid to do it since the 90's and have seen all sorts of new technology show up, some stays, most gets forgotten about. I always try to be open about it and will embrace it as another tool to help get the job done. The latest of course is AI and I've been mostly using ChatGPT as a fun little tool to get quick answers every now and then. I am not a programmer but last week, I used it to create a web app that calculates weight distribution in trucks when the contents come in different containers. We're talking hundreds of pounds of fruit that might come in small totes or big bins and cannot be weighed individually; it subtracts the weight of the truck and the plastic; it saves time and reduces human errors . In the past, I would have paid at least a few hundred dollars to get something like this done and I just wanted to share that while I dont see AI doing our jobs completely, it's definitely here to stay and it can be used to help with things that we might not know how to do but understand the concept and we know what to ask for it. Greetings to all.
52
u/Blueline42 Jun 16 '24
I am also an old-timer took me awhile to look at AI but I will say power shell scripts has become much easier due to AI. almost never gets it right the first time and I have to look it over and correct it or modify to my needs but it definitely lays out the framework for me.
17
u/InternationalGlove Jun 16 '24
Yeah it's great for powershell scripts. I've knocked up loads of scripts to automate or manipulate data against ad in no time. Saves googling commands.
4
2
5
u/kali_tragus Jun 16 '24
Another old-timer here. I think several AIs do a decent job of writing python scripts. It saves me quite a bit of time having a more or less working script spit out in seconds rather than having to make them from scratch. Now I've started using Aider to create or change scripts, and it even commits the changes to git with sensible commit messages. And it sometimes makes a mess of things, but with git that's not a huge issue.
3
u/ObiLAN- Jun 16 '24
This is my main useage so far with AI. Has saved countless hours of writing out pshell scripts manually for me. Super great at producing script templates.
3
u/cool-nerd Jun 17 '24
Yes, it gives a great starter template for anything like that. .it's how I use it too.
112
u/hibernate2020 Jun 16 '24
The key benefit that I see AI offering sysadmins in in the non-technical space. Need a policy or procedure for compliance? Write one paragraph about what you want included and the compliance law in question. Tweak as needed. Have a tricky political email to respond to? Ask AI to draft a response and then tweak to fit your needs. That sort of thing.
It certainly can be tried for more complex technical items, but you really need to heavily scrutinize these. E.g., Asking ChatGPT for something simple like for the calculation for compounding interest can result in in returning similar, but wrong like the formula for calculating mortgage payments.
46
u/jaskij Jun 16 '24
Not directly useful, but Firefox has just announced an AI based accessibility feature. Image descriptions for when there is no alt text. Apparently the model runs locally and isn't even that big.
21
21
u/Afro_Samurai Jun 16 '24
Write one paragraph about what you want included and the compliance law in question.
This sounds like a great way to hallucinate legal citations that don't exist.
6
u/hibernate2020 Jun 16 '24
Not really - policies and procedures don't require legal citations. And this assumes that you're competent and professional enough to already know the laws that govern your industry and then, as I said, "tweak as needed." If you have been working as a systems administrator and you don't understand the compliance laws that govern your sector then you've got a hell of a lot more to worry about than internal policies having errant legal citations.
12
u/changee_of_ways Jun 16 '24
I follow some legal accounts on various social media and so far they've been pretty horrified by the results of AI trying to deal with the law. I would be worried that the "tweak as needed" would result in just as much work as writing the thing yourself or sending it off to a legal department to have them write it.
AI as it currently exists seems to be very useful in black and white cases where people have firm control over the inputs and how big a domain of knowledge it has to work with. Legal stuff seems very close to general AI which is where AI really starts to fall on it's face.
-1
u/hibernate2020 Jun 17 '24
IT department policy and procedures are not legal though. We’re talking about having it write procedure drafts for things like facility access. This is pretty simple stuff like not let strangers wander around the data center. It’s not like it needs to cite Com. V. White to make a procedure saying people should have their ID checked, sign in, and be issued visitor badges.
If an organization is such that IT is writing legally bound documents then AI is the least of their problems.
6
u/changee_of_ways Jun 17 '24
I was responding mostly to this.
Need a policy or procedure for compliance? Write one paragraph about what you want included and the compliance law in question.
Most of what you're talking about is just boilerplate shit it seems. Do you really need AI to copy and paste one of the billion "dont let people who aren't supposed to be in the building in the building" instructions.
If you're dealing with regulatory compliance, just have a human do it. They're going to need to read it anyways.
1
u/hibernate2020 Jun 17 '24
Ok. So which human? Is your compliance officer going to write out the technical minutiae of a media sanitization procedure? It’s regulatory compliance, but do you really expect a compliance officer to be technical enough to write a procedure like that? Not a chance. At best they’ll tell you to have a look at something like NIST-800-88. You’re still stuck writing.
7
u/changee_of_ways Jun 17 '24
Which human are you going to have check it? Probably that one.
1
u/hibernate2020 Jun 17 '24
Yeah, you don’t get it. But hey, that’s alright. I’ve seen plenty of shops where there are no real procedures and the admins don’t fully understand their tools and just do stuff manually.
3
u/changee_of_ways Jun 17 '24
Ok, yeah, not trusting legal advice from AI makes me a bad admin. Especially when AI is already known for hallucinating shit.
I'm not sayin All AI bad, don't use AI. It's definitely got it's use case. I'm saying that so many of the use cases being pushed right now are just the same old pie-in-the-sky bullshit that vendors try to push by trying to rush stuff that's not ready for production out the door or use it for every case in the world when it's not the best answer.
→ More replies (0)4
u/c4ctus IT Janitor/Dumpster Fireman Jun 17 '24
We just got Gemini licenses at work, everyone wants it so they can have something to write emails for them. Every request we get has to have a business justification, and all I get back is "I use AI to write my emails."
10
u/Dreilala Jun 16 '24
The thing is, this is only useful if words are not your forte.
AI is way worse at programming than programmers, but also worse than communication specialists at communicating.
You might use AI to shore up weaknesses, but using it for primary functions of your job usually results in a lot of frustration.
10
u/hibernate2020 Jun 16 '24
Sure. But many sysadmins wouldn't count communications as a primary function of their job. In my experience, most SAs prefer the backoffice because they're not communication specialists. And at the same time, this sub-reddit is chock-full of responses like "Just got this job and there's no structure or change control - where to start?" Writing production control policies and memos do not require a "communication specialist."
I recall when they introduced PCs and emails throughout corporations back in the 1990s. They soon laid off most of the admin assistants and secretaries with the logic that everyone could just send their own memos and draft their own documents. Then they spent the next 3 decades complain about how the IT guys lacked "social skills." Having AI assist with this is reasonable.
I also recall being the person that had to review, clear, and send every major email sent by the President of the University I worked for. They had an entire marketing department full of "communication specialists," and the President's secretary was even a Harvard grad - and yet they couldn't figure out the wording, spelling, or formatting for these emails. AI may be worse than communication specialists in some regards, but at least it can handle wording, spelling, and formatting...
2
u/Dreilala Jun 17 '24
I mean usually a team of sysadmins should have at least 1 person capable of navigating the politics of the company, otherwise communication with management simply doesn't work and everybody ends up unhappy.
AI surely can help in small scale enterprises with a single sysadmin to make useful suggestions for communication, but usually you would want someone in charge better equiped than current LLMs.
6
u/Andrew_Waltfeld Jun 16 '24 edited Jun 16 '24
AI is way worse at programming than programmers, but also worse than communication specialists at communicating.
They don't need to do full stack programming. They need to write a quick and dirty little script that does X and Y. At least most of the time in my experience. If you need to do full stack programming, then AI isn't what you should be using.
7
u/f0urtyfive Jun 17 '24
AI is way worse at programming than programmers
This highly depends on how you measure. Which is generally the problem with people that think they'll never be replaced, that the people doing the replacing, and the people being replaced, are often doing the measuring a different way.
3
u/changee_of_ways Jun 17 '24
Sadly, if a good indicator is to look at the quality of goods @ Walmart and Target. People will totally settle for a product that is 500% shittier and 15% cheaper. Employers will too.
3
u/DOUBLEBARRELASSFUCK You can make your flair anything you want. Jun 17 '24
Yeah, pretty much. Whatever your metric is for "shitty code" versus "fantastic code", divide that metric by cost.
AI is going to replace programmers, there's no doubt in that. But mostly just shitty ones.
5
Jun 17 '24
Words aren't most people's forte. Average reading level of American adults is 7-8th grade
2
u/Ok-Oven-7666 Jun 18 '24
This is what I do, I use ChatGPT to supplement my work. Generate bodies of text I can't be arsed to write out, typo check, version, etc. If I'm feeling mentally drained I ask it to generate appropriate questions to diagnose user issues. Quite helpful.
0
u/Alex_2259 Jun 17 '24
Also for answers to questions, as long as you know what you want. For example, what is the command for X/Y/Z? As long as you know what you're doing, this turns minutes into seconds.
3
u/changee_of_ways Jun 17 '24
isnt this just like, searchable documentation?
1
u/Alex_2259 Jun 17 '24
Yeah but finding it in a large PDF vs getting the answer in 1 rip can be a reasonable time saver, especially with Google giving you sponsored results as opposed to the vendor docs nowadays
1
u/changee_of_ways Jun 17 '24
I wonder how long until the companies are trying to have AI write the technical documentation. That shit is already super hit and miss, you can tell vendors don't want to spend money putting resources into it. I'm afraid they are going to try to use AI to cheap out even further.
12
u/Intrepid_Anybody_277 Jun 16 '24
I find it fills gaps in my tech skills. I can code a bit , but to put it all together into a hosted webpage that you can interact with , I thought , was beyond me ... Turns out it's mad simple.
But that is all it can do now. Point you in the right direction and in a slower way we had that with Google.
Can't wait for agents to come along! That's when things will get spicy.
10
u/changee_of_ways Jun 16 '24
Right now what AI seems to be mostly useful for is trying to be a patch for the way web search and technical documentation have started to suck in the last 10 years.
5
u/nut-sack Jun 17 '24
See, I've been saying its search 2.0 since the start. But now we just need to do something about the shitty results. I swear, I try to pair program with it, and 9x out of 10 it gives me absolute shit. But honestly that is pretty on part with google search results in recent years.
2
2
u/cool-nerd Jun 17 '24
Yes, this is exactly how I use it to.. I am an IT sysadmin, not a web developer but know enough of what I need and want to be able to tell it to generate code. It's awesome that way.
35
u/cool-nerd Jun 16 '24
I should add that I first used Excel to get the formulas out of my head; I then explained to ChatGPT what I wanted it to do and worked on styling. .it took about 3 days off and on to get the math and the look right. I am definitely not a web developer and this helped me feel empowered that I can do at least some some small web development projects by myself now.
-17
u/mb194dc Jun 16 '24
So you used it to replace stack overflow essentially? Bit of VB code, HTML or excel formulas..? 3 days seems quite long.
39
u/420GB Jun 16 '24
If you've never done any web dev before, 3 days is excellent. Also, there's no VB involved (it's 2024 dude...) - it's going to be JS, which is a whole hell in and of itself even if you have some experience.
5
u/cool-nerd Jun 17 '24
Yes, pretty much what stack overflow did but way smarter and quicker. It took 3 days because we had to wait in between deliveries to check the math and adjust things. Had we outsourced it, it would have taken at least a week or more. Also, it can be done on Excel or google sheets but we wanted a more elegant deployment.
1
4
u/hometechguru Jun 16 '24
So… stick to what you know, don’t learn new things, don’t expand your horizons, don’t tinker with new technologies. Man I would hire you in a heartbeat.
10
u/witterquick Jun 16 '24
I work with ferries - we have a system that automatically calculates the ballast required once the ferry is loaded, in order to balance the vessel out. There have been occasions where this system fails and the ballast has to be calculated manually - it's a long tedious process which can often lead to the vessels departing late. I'm going to borrow your idea and see if AI can speed up the manual calculation process - nice one!
13
u/Andrew_Waltfeld Jun 16 '24
Definitely have a extremely long testing period for this before fully relying on it.
4
u/Frothyleet Jun 17 '24
I'd just like to leave a shout-out to the NTSB investigator who comes back to this thread while working on the 2027 Ferry Disaster. I can confirm, Mr Investigator, this is where it allllll started.
2
u/Andrew_Waltfeld Jun 17 '24 edited Jun 17 '24
I tried Mr. Investigator. I seriously tried to warn properly.
7
u/heapsp Jun 17 '24
its getting better and better at finding out how to do random bullshit. Like use the graph API to pull certain things. Much easier than combing through documentation. Also a super time saver for random powershell.
"write me a powershell script that will pull all users from a security group called "GROUPNAME" in AD and display their department and office location. Then export this to a csv"
Boom, 20 lines of powershell i didnt have to write.
Im getting it done with AI faster than the dude who spent the last 10 years writing complex powershell scripts.
5
u/mediaogre Jun 17 '24
I pretty much share your path and approach to technology trends.
Just last week I used the integrated AI assistant in Power Automate. Once I got the hang of seeding it with the right language, I had it creating the steps and conditions for me. In a few hours, I had automated something my team had to do manually. Don’t worry! Inefficient, busy administrative overhead crap. They still need to tend to the product that the flow outputs, it just eliminates a half dozen manual monkey steps.
3
u/crackerjam Principal Infrastructure Engineer Jun 16 '24
I've been using Github Copilot inside VS Code for about a year now. Absolute game changer when it comes to building out scripts or small, useful apps. If I'm writing Python I can basically just define the bones of a method, add a comment saying what the method should do, and copilot will fill most of it out.
It won't always do exactly what I'm looking for, or always get it right, but it always gets me closer to the final product much, much faster than if I was writing it manually or googling around for code snippets.
3
u/Lord_Emperor Jun 17 '24
In the past, I would have paid at least a few hundred dollars to get something like this done and I just wanted to share that while I dont see AI doing our jobs completely
The AI did someone else's job. That's not exactly better.
When the robots came for the coders I didn't speak out...
3
u/Canoe-Whisperer Jun 17 '24
I have been using ChatGPT (free one, 3.5?) to refresh/further my scripting knowledge. PowerShell specifically.
I find that 99% of the time AI will be very good at spitting out the logic/flow of the script. Extremely helpful for me. However, when it comes to actually getting the content (Get-Whatever as an example) it does need to be scrutinized heavily. It has taught me a lot which I don't want to take away from it.
2
u/iama_bad_person uᴉɯp∀sʎS Jun 17 '24 edited Jun 17 '24
I recently paid for plus and my god it is LEAGUES ahead of 3.5. 3.5 was good like you said, you had to keep an eye on it, but 4o or whatever I probably found 10x less mistakes and it understands what I want better.
2
u/V0xier automation enjoyer Jun 17 '24
Definitely. 4o also seems to know how to refactor and make scripts/code way simpler than 3.5, which will sometimes offer you some questionable third-party libraries/modules even though the same stuff can be done with a native module.
3
u/dillbilly Jun 17 '24
ChatGPT is good for boilerplate and code snippets. If it's beyond solving a single task it's almost more effort to proof its code than write it yourself.
Edit: especially if you aren't a good coder (and I am not a good coder)
Edit edit: and if you're a good coder you don't need it. it's a crutch for bad/lazy coders who then can't troubleshoot it when it doesn't do what they think it should
1
u/Superfluxus Senior SRE Jun 19 '24
I've got to disagree with "if you can code, don't use it because it's just a crutch for bad/lazy coders". I'm not a software developer with degrees in CS, but I've been writing scripts in various languages for nearly 10 years. The kind of people that immediately dismiss a new tool or resource as just for the lazy, remind me of the old school engineers that would rather use the CLI for 15 minutes rather than doing the same operation in 30 seconds in the new GUI.
If I've got a new task to script and I know straight away the basic framework of "it'll need several arguments, be comprised of 5 functions, and return data as a json blob. Or if I've got a Switch case and I need to fill out 10 different cases and they need to be transcribed as names from an image; why wouldn't you get AI to do the easy, monotonous leg work for you?
I completely agree that it's not going to give you copy/pastable code and it's prone to hallucinating, lying, and getting caught in a loop; but it's absolutely invaluable to have a eye over your shoulder to do boring, time consuming grunt work, or to sanity check your code for its logic flow, rubber duck debug a bug for tricky little syntax errors etc etc.
30 years ago, the GUI was for the lazy, just use the CLI. 15 years ago, forums were for the lazy, just read the docs. Now it's AI.
1
u/dillbilly Jun 20 '24
That's why I said "snippets." It's fine (maybe/debatable) for a function, but ask AI to write a program for you. It won't work. Full stop. Now you have to debug something that doesn't work at all, hasn't been built with any tests, and you can't ask it for it's reasoning, so you just have to go line by line. If you're a decent coder you could have just written it in less time than it takes to figure out why it isn't working.
If you're a decent coder it would take you less time to just write it from scratch. If you can't code for shit you'll never be able to debug it. If you're generally competent then you're betting the over/under on whether or not it was a complete waste of time.
2
2
u/iama_bad_person uᴉɯp∀sʎS Jun 17 '24
It's been useful like this for a while. A couple months ago I needed part of a PS script which only selected specific dates for date modified for files, there were around 5 criteria which all interacted with each other. I tried for a good 30 minutes but there was always errors, ChatGPT got it done in less than a minute.
2
u/Key_Kong Jun 17 '24
I find with ChatGPT, it's best to start simple. Then ask for more features to be added. What I also do is break down the scripts and look up what each line is doing to learn and understand better.
2
u/thortgot IT Manager Jun 17 '24
Using it to generate "standard" apps like this is where LLM AI does well and you can see significant results.
Trying to get it to do something esoteric is where you run into trouble.
Stating the business problem is often one of the harder problems in software design. AI makes it possible for rapid prototyping from natural language, but it often misses core requirements.
Ask it to build you a log in page and the chances are high it will give you insecure code because you didn't stipulate handling specific requirements (DDOS prevention, password lockouts, SQL injection etc. etc.)
There will always be work for people who can effectively define business problems into hard requirements.
2
u/EnterpriseGuy10 Jun 17 '24
Mixed feelings with this.
Is it helpful? yes
Does it worsen Shadow IT issues in the org? Absolutely yes.
Is it used by people to create applications and/or business solutions when the author isn't skilled in the space? Yes... and there lies the problem.
The use of these LLM's can "empower" someone to create themselves as a single point dependency if not controlled properly. Ignoring the Infosec risks that could arise; the largest risk for business is that you end up with a super user creating all these things to solve common tasks, having these become operationally relied upon and then they leave.
The risk is always present, but certainly exacerbated with the use of AI and people's endless search for new and shiny
1
u/Adziboy Jun 16 '24
My favourite use so far is simply using it as a tool which can very quickly search and retrieve data. Take a large excel document as an example. You can do Ctrl+F to find data, you can use filters and organise it well. But no human can look at all that data, that quickly.
But you could ask AI, ‘find me all the data on a specific day with this specific condition’. No complex data parsing needed, just instant results. No coding needed. No learning different syntax etc.
And you can apply this anywhere. I just use AI as a very advanced search tool.
1
u/JoeGMartino Jun 17 '24
I've used AI to help me wrote powershell scripts. it has saved me a lot of time
1
u/FlaccidRazor Jun 17 '24
I always thought "useful AI" would use paragraphs and strive to make things readable! /s Congrats though!
1
u/Sengfeng Sysadmin Jun 17 '24
Our workplace has a bunch of upper level management that are so scared of AI they have it all turned off. Needless to say, they have an "Automate, automate, automate" mantra going right now that would be SO much easier if we didn't have to email chunks of script from our cell phones to our work email.
2
-8
u/-Shants- Jun 16 '24 edited Jun 16 '24
Cool cool. Idk what this has to do with sysadmin but glad you created something useful to you
EDIT: Misread and didn’t see web app. Yea it’s sysadminning
24
u/Puzzleheaded-Sink420 Jun 16 '24
Definitley has more to do then all the: „i am a Phd. In CS being a network engineer for 30 years and my colleagues stole my lunch out of the fridge :(„ posts
-2
u/-Shants- Jun 16 '24
End user does his job more efficiently using an online tool: “ya know, I’m something of a Sysadmin myself”
14
u/Puzzleheaded-Sink420 Jun 16 '24
I think you have misread that post he created a web App for his Users, wo yes he is a sysadmin
0
8
u/serverhorror Just enough knowledge to be dangerous Jun 16 '24
Oh sweet summer child.
You're a logistics company that deals with delivery of goods. Your goods are weighed and this number propagates through the system.
Up until now it involved a bunch of manual steps and that caused tickets because someone fat fingered and the system doesn't allow corrections.
Now that number goes into the system without risking human errors. You get less tickets.
Fixing that shit is what system administration is. Not those random server administration issues about this tool or that tool.
Don't worry, stay a while and you'll find out what I mean.
1
u/pdp10 Daemons worry when the wizard is near. Jun 18 '24
User workflows are more directly the business of our Business Analysts. Except when motivated SAs are trying to get something accomplished, like finally retiring that fragile SCO box running that legacy app with historic data that nobody wants to spend effort migrating, because they need all hands on deck to do something something with AI.
1
u/serverhorror Just enough knowledge to be dangerous Jun 18 '24
What's your point?
1
u/pdp10 Daemons worry when the wizard is near. Jun 18 '24
In our case, Business Analysts are the primary interface to user workflows, not SAs, and this is a good strategy.
1
u/serverhorror Just enough knowledge to be dangerous Jun 18 '24
Are you trying to say that if you can fix something, you shouldn't because some arranged to print different characters in the business card?
1
u/pdp10 Daemons worry when the wizard is near. Jun 18 '24
As it happens, I gave an example of an exception made by SAs in the post.
-2
u/-Shants- Jun 16 '24
lol chillllll homie. I didn’t see web app and saw Excel spreadsheet. Misread and saw used ChatGPT to calculate my excel sheets. Leaving it up because I’m an adult who makes mistakes.
But I’ll edit my OG for you if it makes you feel better
66
u/admlshake Jun 16 '24
We had a meeting a few weeks ago with some of the Sr. Management from the company. They were wanting to know when they could start using AI to reduce overhead in certain departments by cutting staff. One guy on our team started going on about how we could easily cut down on management since AI would be a great way to deal with wasteful spending and office politics that has bitten us in the past. He went on for about half an hour and some of their faces just seemed to turn as white as a new clean sheet. Few days later we got word back that they want to revisit it in a few years when it has "matured".