Sponsored Content
Top Forums Shell Programming and Scripting Geographical location details of a server Post 302665885 by Neo on Tuesday 3rd of July 2012 10:09:43 AM
Old 07-03-2012
The way I see it is that if you are operating in a shell within a unix/linux environment, you are "in the shell" and if running script (any script) withing the shell you are running a "shell script".

This also means that you could compile the C code from MaxMinds that goes geolocation and run that binary "in the shell" and you are running a "shell script".

We run MaxMinds geolocation code/scripts on many web sites, and sometimes the requirement is for continent, country, region, state, designated metropolitan area (DMA), city, or even area code or zip code.

Frankly, I would never do this calling a service using wget or curl; because that would be adding an unnecessary, unreliable, and slow network call across the net to get geolocation data that is easily obtained with the various (free, opensource) MaxMinds APIs. mod_geoip for Apache is based on the same code.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

how to find out unix server details

I like to find out Server Drive/Storage Specifications like Drive Size? Storage Type: Local or SAN ? Number of Processors: Processor Speed: Memory: please someone help me out how I can get from command line? Thanks you in advance (4 Replies)
Discussion started by: thopputhurai
4 Replies

2. Solaris

Find server details

Hi experts Is there a command or a way in Solaris to find server details like this: SUN240R 2 @ 160MHz CPU 1Gb memory Solaris8 lan0 (16SV LAN) 100FD lan1 (45CI LAN) 100FD lan2 (8CON LAN) 10HD lan3 (38SY LAN) 100HD Thanks (1 Reply)
Discussion started by: lalelle
1 Replies

3. Solaris

Some Details from my server like mirror

Hello, I need to get some details from my server like Internal hard disk details for my UNIX (Solaris 9) server like whether OS is mirrored or not, what type of mirror is used. Which hard disk are used for mirror ? Regards (1 Reply)
Discussion started by: adel8483
1 Replies

4. Shell Programming and Scripting

Find the geographical location within a shell script

Hi, I need a shell script that when run should be able to find the geographical location of the system. can anyone help me with this? Thanks, Sundeep (1 Reply)
Discussion started by: eamani_sun
1 Replies

5. HP-UX

HP-UX Server Details

OS: HP-UX I need the following details from HP-UX server. I don't have root login, so most of the commands require root privilege 1. No of cpu in the server 2. Total Memory, Free & Used 3. Space used and free space Any help would be highly appreciated (6 Replies)
Discussion started by: manijash
6 Replies

6. AIX

AIX Server P560/P570 Details

Hi Guys, Require your help please to find out the power consumption for IBM P6 series server. 1> What is the maximum power used by one IBM AIX P560 & P570 server in kilo watts (KW). 2> What is the weight of one IBM AIX P560 & P570 servers in KG. This is urgently required for me to procure... (1 Reply)
Discussion started by: ajilesh
1 Replies

7. UNIX for Dummies Questions & Answers

how to check SMTP server details on Unix

Hi All, I am trying to figure out how to check SMTP server details on Unix enviornment? I tried using echo "hello" | sendmail -v abc@xyz.com and got following error: -bash: sendmail: command not found -bash: echo: write error: Broken pipe Any help will be much appreciated regarding... (2 Replies)
Discussion started by: palak08
2 Replies

8. Solaris

Sun Server Hardware Inventory Details

How can I get the hardware inventory details of the Sun Servers like T5220 running Solaris 10? I would like to see the following details: 1. Chassis Information - Part Number, Serial Number etc. 2. Slots Present in the chassis 3. Modules/Cards equipped on the slots. Module details like Part... (8 Replies)
Discussion started by: baddy
8 Replies

9. UNIX for Advanced & Expert Users

NTP server name and ip details on Linux/Solaris

Hi All, Where can I find all the NTP server names/ip addresses on Linux/Solaris systems. How can I grep these names/IP address from specific files from a specific OS (Linux/Solaris). I know on linux /etc/ntp.conf and /etc/ntp/ntp.conf on solaris contains these details. Whether I am right about... (4 Replies)
Discussion started by: sanzee007
4 Replies

10. Shell Programming and Scripting

Geographical distance between long and lat in bash

Does anyone know of any script or packages that allow the calculation of the geographical distance between two points of lat/long from within a bash shell? I have been searching the web for the past few days and none of the options seem compatible with bash variables... (eg. geodist) Many... (3 Replies)
Discussion started by: lily-anne
3 Replies
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 07:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy