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: 170

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
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
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

Offline

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

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

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
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
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)

Offline

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

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

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,810

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
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
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

Offline

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

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

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
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
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.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB