You are not logged in.

#1 2013-04-11 18:38:10

Multimoon
Member
From: /usr/share/zoneinfo/US/Eastern
Registered: 2012-09-30
Posts: 169

Controlling status indicators

Soon I'm going to set up a server, and I want to be prepared to set it up very quickly. Assuming a computer has any number of LED status indicators, purpose aside, can one turn these off and on via a script?


It always makes me laugh when people complain and rage over any distro's management ideal, when this is a linux community, and you could always make your own distro and experience the pains yourself.

Offline

#2 2013-04-11 18:40:30

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: Controlling status indicators

It depends on what the LEDs are. For instance, `setleds` can be used to control the Keyboard {scroll,caps,num}lock keys. And there are often times LEDs to be found in /sys/class/leds that can be controlled through shell scripting.

However, until you tell us what the indicators are specifically, or know what file controls their brightness/status, we can't help much beyond speculation.

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#3 2013-04-11 19:11:33

Multimoon
Member
From: /usr/share/zoneinfo/US/Eastern
Registered: 2012-09-30
Posts: 169

Re: Controlling status indicators

Thats the issue, I just ordered the computer I plan to use today, so I dont know exactly where/how it will mount. Using the assumption that it has something such as a lighted power button, what would be the most common place for that to be, and how could you control it via something such as a bash script?


It always makes me laugh when people complain and rage over any distro's management ideal, when this is a linux community, and you could always make your own distro and experience the pains yourself.

Offline

#4 2013-04-11 19:28:36

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: Controlling status indicators

I've never tried to look into that, but I imagine it would probably be, if anywhere, in /sys/class/leds (honestly don't know though). As for controlling it. If you can edit the file which controls its brightness (or on/off), then you can just use a script to tee the value you want into the file. I use this script, for instance, to control my keyboard backlights.

All the best,

-HG

Last edited by HalosGhost (2013-04-11 21:37:30)


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#5 2013-04-11 20:00:04

Multimoon
Member
From: /usr/share/zoneinfo/US/Eastern
Registered: 2012-09-30
Posts: 169

Re: Controlling status indicators

Thank you, I'll have to look. Your script is nice though, that will diffidently help.


It always makes me laugh when people complain and rage over any distro's management ideal, when this is a linux community, and you could always make your own distro and experience the pains yourself.

Offline

#6 2013-04-11 21:07:08

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,619

Re: Controlling status indicators

I would be surprised if the 'standard' leds (power, hdd activity) are controllable. Your only option is probably plugged in (to motherboard) or not.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#7 2013-04-11 21:37:49

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: Controlling status indicators

alphaniner wrote:

I would be surprised if the 'standard' leds (power, hdd activity) are controllable. Your only option is probably plugged in (to motherboard) or not.

I'd imagine alphaniner is correct on this one.

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#8 2013-04-11 23:56:34

Multimoon
Member
From: /usr/share/zoneinfo/US/Eastern
Registered: 2012-09-30
Posts: 169

Re: Controlling status indicators

I'll have to look into that, if the system lets you control those lights.


It always makes me laugh when people complain and rage over any distro's management ideal, when this is a linux community, and you could always make your own distro and experience the pains yourself.

Offline

#9 2013-04-12 00:25:01

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,699
Website

Re: Controlling status indicators

I'm also skeptical whether those particular LEDs (power button and hdd) would be controllable, but in either case, I encourage everyone to journey down the /sys/* rabbit whole at least a couple times.  There's a lot of education to be had there.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

Board footer

Powered by FluxBB