LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2012, 10:30 AM   #1
bloozman23
LQ Newbie
 
Registered: Jan 2011
Location: India
Distribution: ubuntu/Fedora/Puppy
Posts: 29

Rep: Reputation: 0
Question How do i check a server's os?


Hi,
I have to deploy an executable generated by Matlab as web application,the executable generated by Matlab are OS specific so ,I need to compile on the same OS {Matlab standalone doesn't have a cross compile option}.

How do i check a server's os?
I am using a free-web hosting for my needs.
 
Old 02-06-2012, 10:33 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,688
Blog Entries: 23

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Have you put that very question to them (your provider) yet? I'm convinced a simple mail will yield all the answers. However (and this is the downer) i doubt you'll be allowed to compile something like that on a free service, you may have to look into dedicated (and payed-for) services instead...
 
1 members found this post helpful.
Old 02-06-2012, 07:33 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by bloozman23
How do i check a server's os?
On a number of unix-like OSes, you can get good clues with one or both of:
Code:
$ uname -a

$ cat /etc/issue
 
1 members found this post helpful.
Old 02-06-2012, 08:56 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
Also
Code:
cat /etc/*release*
 
1 members found this post helpful.
Old 02-07-2012, 05:29 AM   #5
bloozman23
LQ Newbie
 
Registered: Jan 2011
Location: India
Distribution: ubuntu/Fedora/Puppy
Posts: 29

Original Poster
Rep: Reputation: 0
Question

Additional Info

I intend to compile the executable on my Workstation ,and then upload the executable,
My distros -Ubuntu,Puppy

I suspect server uses Cent OS ?

uptime.netcraft.com

says

OS Server
Linux ATS/3.0.2

Last edited by bloozman23; 02-07-2012 at 05:31 AM.
 
Old 02-07-2012, 06:16 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by bloozman23 View Post
I intend to compile the executable on my Workstation ,and then upload the executable
Does that mean a bash solution to your requirement would not be accepatable?
 
Old 02-07-2012, 11:49 AM   #7
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,688
Blog Entries: 23

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
I intend to compile the executable on my Workstation ,and then upload the executable
May fail...I for one am sceptical about this approach (any other view are welcome) because the shared libs on your system may not be around on the destination/production system: the server.
Besides, I'd check with netcraft if installing any-thing is even allowed unders the scheme you have...you may have to go with dedicated hosting plans...
 
1 members found this post helpful.
Old 02-07-2012, 05:01 PM   #8
clocker
Member
 
Registered: Sep 2011
Distribution: fedora, redhat, mint
Posts: 87

Rep: Reputation: Disabled
what ever linux distro you are running
#uname output's the os name
#uname -a output's the os name and the kernel version
 
1 members found this post helpful.
Old 02-07-2012, 05:15 PM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
If you're looking asking how you would discover your client's OS, perhaps this (from javascripter.net) might help:
Code:
To detect the operating system on the client machine, your script can analyze the value of navigator.appVersion or navigator.userAgent. Below is a simple example of a script that sets the variable OSName to reflect the actual client OS.

// This script sets OSName variable as follows:
// "Windows"    for all versions of Windows
// "MacOS"      for all versions of Macintosh OS
// "Linux"      for all versions of Linux
// "UNIX"       for all other UNIX flavors 
// "Unknown OS" indicates failure to detect the OS

var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

document.write('Your OS: '+OSName);
You could put this in a "download" or "install" HTML file, place the answer in a cookie, read the cookie, and branch accordingly. Or just branch depending on the answer. (I'm assuming you're familiar with HTML.)

Last edited by PTrenholme; 02-07-2012 at 05:17 PM. Reason: Added comment
 
1 members found this post helpful.
Old 02-07-2012, 10:09 PM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by clocker View Post
what ever linux distro you are running
#uname output's the os name
I do not believe that is true. On Slackware 13.1 it simply outputs "Linux". There is no single command that can be used or file that can be read on GNU/Linux distros to determine which distro it is. On some (most?) distros the technique varied as the versions/releases evolved.
 
1 members found this post helpful.
Old 02-09-2012, 07:07 AM   #11
bloozman23
LQ Newbie
 
Registered: Jan 2011
Location: India
Distribution: ubuntu/Fedora/Puppy
Posts: 29

Original Poster
Rep: Reputation: 0
Post

Matlab Website provides the following information

Qualified distributions*:

Ubuntu 10.04 LTS, 10.10, and 11.04

Red Hat Enterprise Linux 5.x and 6.x

SUSE Linux Enterprise Desktop 11.x

Debian 5.x

Also it says
It is likely that other distributions with kernel version 2.6 or later and glibc version 2.5 or later can successfully run MathWorks products.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Check server down and do something jonaskellens Linux - Newbie 6 10-18-2010 05:13 AM
How can I sync my server's time with a certain date server and have it check itself abefroman Linux - Server 4 07-18-2008 06:54 PM
Health Check / Server Completion Check Software? tells Linux - Enterprise 0 04-20-2006 12:03 PM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 03:10 AM


All times are GMT -5. The time now is 01:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration