Bug 7069 - Enhancement: Show server's MAC address on Settings-->Status page
: Enhancement: Show server's MAC address on Settings-->Status page
Status: NEW
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 7.4.0
: All All
: -- enhancement with 1 vote (vote)
: Future
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-10 11:17 UTC by Gordon Harris
Modified: 2009-07-13 15:18 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Harris 2008-02-10 11:17:26 UTC
Currently SC7 shows info like this on the Settings->Status web page:

SqueezeCenter Version: 7.0.1 - TRUNK - Red Hat - EN - utf8
Server IP address: 192.168.0.199
Perl Version: 5.8.8 i386-linux-thread-multi
MySQL Version: 5.0.45-log
Platform Architecture: i686-linux
Hostname: slim-minuet.da
Server Port Number: 9000
Total Players Recognized: 2
Cache Folder: /var/lib/squeezecenter_trunk/cache
Plugin Folders: /usr/share/squeezecenter_trunk/server/Slim/Plugin, /usr/share/squeezecenter_trunk/server/Plugins

Also, the status page shows the MAC address of any connected player:

Name: SB3White
Model: Squeezebox v3
Firmware: 86
The IP address for this player is: 192.168.0.202:41404
The ethernet MAC address for this player is: 00:04:20:06:29:30
Wireless Signal Strength: 80

Name: SBReceiver
Model: receiver
Firmware: 22
The IP address for this player is: 192.168.0.221:30491
The ethernet MAC address for this player is: 00:04:20:16:01:ba

It would be handy (for various reasons) if Settings-->Status showed the MAC address of the server.  I know it's easy to log into the server via ssh and perform an "ifconfig" to get the eth0 HWaddr. But, hey...think of the cumulative person-hours saved if this info was easily accessible on the status page.
Comment 1 Blackketter Dean 2008-02-10 21:03:19 UTC
Good suggestion, we'll look at this post 7.0.
Comment 2 Gordon Harris 2009-07-13 09:30:21 UTC
I had a brief exchange with Jörg Schwieder about this.  Apparently, there is no easy way for iPeng to get the server's mac address for WOL purposes on the iThing.  So this would be another case where SC providing the server's MAC address (added to CLI serverstatus?) would be very helpful.

The primitive pete way:

sub GetServerMacAddress {
	my $serverMAC;
	
	if ($^O =~ /^m?s?win/i) {		## Windows?
		$serverMAC = `ipconfig /all`;
	} else {				## Everything else..
		$serverMAC = `ifconfig -a`;
	}

	if ( $serverMAC =~ /((?:[0-9a-f]{2}[:-]){5}[0-9a-f]{2})/i ) {
		$serverMAC = $1;
		$serverMAC =~ s/\-/\:/g ;	## Windows ipconfig formats MAC as aa-bb-cc-dd-ee-ff
		return $serverMAC;
	}

	return 'UNKNOWN';
}

A less kludgy approach might have to involve including other cpan modules, e.g.:

http://search.cpan.org/~tpaba/Net-Ifconfig-Wrapper-0.11/lib/Net/Ifconfig/Wrapper.pm
Comment 3 Joerg Schwieder 2009-07-13 15:18:04 UTC
That would be
https://bugs-archive.lyrion.org/show_bug.cgi?id=10184
then.