Sponsored Content
Full Discussion: Generate UUID for a host
Top Forums UNIX for Advanced & Expert Users Generate UUID for a host Post 302338161 by sysgate on Monday 27th of July 2009 07:01:13 AM
Old 07-27-2009
Your post is incomplete. How will you need to generate / parse / collect / compare those values, what will they serve ? 'hostid' command, for example, is present on both Linux and Solaris, it returns something like : 0x7f0200
You can, however, write your own application to do the host mapping and reporting, but it will still depend on what exactly you need to achieve.
Update : just thought of 'dmidecode' - according to its man pages, it's known to work on multiple OSes.
 

9 More Discussions You Might Find Interesting

1. IP Networking

QNX host cannot ping SCO host, vice versa

The problem I am facing now is that the QNX host could not ping the SCO host and vice versa. They are in the same domain, ie, 172.20.3.xx. As I am very new to Unix, I guess I must have missed out some important steps. Pls help... Thanx alot (2 Replies)
Discussion started by: gavon
2 Replies

2. Linux

How to give UUID to a swap partition?

Dear Folks Is there anyway to give a UUID to a swap partition? mkswap on CentOS 5 (util-linux-2.13-0.45.el5_1.1) appears to override this option ;-( # swapoff -a # mkswap -L swap1 /dev/sda3 Setting up swapspace version 1, size = 4293591 kB LABEL=swap1, no uuid And there's no... (3 Replies)
Discussion started by: Santi
3 Replies

3. UNIX for Advanced & Expert Users

Help! How to find the local host after few ssh hops to remote host???

I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1. When I do a who -m from A2, I see the "connected from" as "A1". => who -m userid pts/2 2010-03-27 08:47 (A1) I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies

4. UNIX for Dummies Questions & Answers

Transfer large number of files host to host

Hello.... I have two servers, one has an empty / and the other has a subdirectory with a large number (4 gig) with many, many files. I need a way to transfer the files en masse from the server with the large number of files to the one that is essentially blank. I don't have space on the used... (16 Replies)
Discussion started by: blaine.miller
16 Replies

5. Shell Programming and Scripting

Help with UUID replacement in fstab and menu.lst

I am trying to write a small backup application for Linux systems file by file if partitions are created by the user using fdisk. I am facing a problem when I am done with restoring the files. The problem is with UUID mismatch in restored fstab and menu.lst. Using C I could create a partlist.txt... (6 Replies)
Discussion started by: arunj
6 Replies

6. Red Hat

How to generate UUID for 2nd Ethernet card?

Dear all, I have two NIC's on my machine. UUID for the first interface (eth0) was generated by the machine automatically. Now I want to generate UUID for the 2nd interface (eth1) please help me out. Thanks in advance...:) (2 Replies)
Discussion started by: saqlain.bashir
2 Replies

7. Solaris

Need to recover/move diskgroup from failed host to another host

Hi All I am having VxVm on two Solaris hosts. host1 is using disk group dgHR. right now this server went down due to hardware fault. Not I need to import this dgHR into host2 server. Please let me know the procedure for the same. (1 Reply)
Discussion started by: amity
1 Replies

8. Shell Programming and Scripting

Script to unmount and mount by UUID

Hi, Need a bit of help on this one as I am a scripting noob. I have a linux based NAS that mounts USB hard drives in an inconsistent location and to make matters worse, seems to lose the mount for an unknown reason and doesn't remount automatically unless the drive is removed and re-inserted.... (4 Replies)
Discussion started by: gtr33m
4 Replies

9. BSD

Find Partition/Slice UUID

I thought I had figured this out at one point, but I can't remember. Is there a way/command to get the UUIDs of a disk's partitions/slices in FreeBSD? Linux has the blkid command, which doesn't seem to be available. (2 Replies)
Discussion started by: AntumDeluge
2 Replies
UUID(1) 						   Universally Unique Identifier						   UUID(1)

NAME
uuid - Universally Unique Identifier Command-Line Tool VERSION
OSSP uuid 1.6.2 (04-Jul-2008) SYNOPSIS
uuid [-v version] [-m] [-n count] [-1] [-F format] [-o filename] [namespace name] uuid -d [-r] [-o filename] uuid DESCRIPTION
OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and IETF RFC-4122 compliant Universally Unique Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 (time and node based), version 3 (name based, MD5), version 4 (random number based) and version 5 (name based, SHA-1). Additional API bindings are provided for the languages ISO-C++:1998, Perl:5 and PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1 and Perl Data::UUID APIs. UUIDs are 128 bit numbers which are intended to have a high likelihood of uniqueness over space and time and are computationally difficult to guess. They are globally unique identifiers which can be locally generated without contacting a global registration authority. UUIDs are intended as unique identifiers for both mass tagging objects with an extremely short lifetime and to reliably identifying very persistent objects across a network. This is the command line interface (CLI) of OSSP uuid. For a detailed description of UUIDs see the documentation of the application programming interface (API) in uuid(3). OPTIONS
-v version Sets the version of the generated DCE 1.1 variant UUID. Supported are version "1", "3", "4" and "5". The default is "1". For version 3 and version 5 UUIDs the additional command line arguments namespace and name have to be given. The namespace is either a UUID in string representation or an identifier for internally pre-defined namespace UUIDs (currently known are "ns:DNS", "ns:URL", "ns:OID", and "ns:X500"). The name is a string of arbitrary length. -m Forces the use of a random multi-cast MAC address when generating version 1 UUIDs. By default the real physical MAC address of the system is used. -n count Generate count UUIDs instead of just a single one (the default). -1 If option -n is used with a count greater than 1, then this option can enforce the reset the UUID context for each generated UUID. This makes no difference for version 3, 4 and 5 UUIDs. But version 1 UUIDs are based on the previously generated UUID which is remembered in the UUID context of the API. Option -1 deletes the remembered UUID on each iteration. -F format Representation format for importing or exporting an UUID. The following (case insensitive) format identifiers are currently recognized: BIN (binary representation) This is the raw 128 bit network byte order binary representation of a UUID. Example is the octet stream 0xF8 0x1D 0x4F 0xAE 0x7D 0xEC 0x11 0xD0 0xA7 0x65 0x00 0xA0 0xC9 0x1E 0x6B 0xF6. STR (string representation) This is the 36 character hexadecimal ASCII string representation of a UUID. Example is the string "f81d4fae-7dec-11d0-a765-00a0c91e6bf6". SIV (single integer value representation) This is the maximum 39 character long single integer value representation of a UUID. Example is the string "329800735698586629295641978511506172918". -o filename Write output to filename instead of to stdout. -d Decode a given UUID (given as a command line argument or if the command line argument is "-" the UUID is read from stdin) and dump textual information about the UUID. EXAMPLES
# generate DCE 1.1 v1 UUID (time and node based) $ uuid -v1 01c47915-4777-11d8-bc70-0090272ff725 # decode and dump DCE 1.1 v1 UUID (time and node based) $ uuid -d 01c47915-4777-11d8-bc70-0090272ff725 encode: STR: 01c47915-4777-11d8-bc70-0090272ff725 SIV: 2349374037528578887923094374772111141 decode: variant: DCE 1.1, ISO/IEC 11578:1996 version: 1 (time and node based) content: time: 2004-01-15 16:22:26.376322.1 UTC clock: 15472 (usually random) node: 00:90:27:2f:f7:25 (global unicast) # generate DCE 1.1 v3 UUID (name based) $ uuid -v3 ns:URL http://www.ossp.org/ 02d9e6d5-9467-382e-8f9b-9300a64ac3cd # decode and dump DCE 1.1 v3 UUID (name based) $ uuid -d 02d9e6d5-9467-382e-8f9b-9300a64ac3cd encode: STR: 02d9e6d5-9467-382e-8f9b-9300a64ac3cd SIV: 3789866285607910888100818383505376205 decode: variant: DCE 1.1, ISO/IEC 11578:1996 version: 3 (name based, MD5) content: 02:D9:E6:D5:94:67:08:2E:0F:9B:93:00:A6:4A:C3:CD (not decipherable: MD5 message digest only) # generate DCE 1.1 v4 UUID 4 (random data based) $ uuid -v4 eb424026-6f54-4ef8-a4d0-bb658a1fc6cf # decode and dump DCE 1.1 v4 UUID 4 (random data based) $ uuid -d eb424026-6f54-4ef8-a4d0-bb658a1fc6cf encode: STR: eb424026-6f54-4ef8-a4d0-bb658a1fc6cf SIV: 312712571721458096795100956955942831823 decode: variant: DCE 1.1, ISO/IEC 11578:1996 version: 4 (random data based) content: EB:42:40:26:6F:54:0E:F8:24:D0:BB:65:8A:1F:C6:CF (no semantics: random data only) SEE ALSO
uuid(3), OSSP::uuid(3). 04-Jul-2008 OSSP uuid 1.6.2 UUID(1)
All times are GMT -4. The time now is 08:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy