Sponsored Content
Operating Systems Solaris Last command displays wrong information Post 302543286 by bartus11 on Saturday 30th of July 2011 03:34:57 PM
Old 07-30-2011
Quote:
Originally Posted by Sojourner
Thanks all, for helping me ..
Bartuss11: how do i use wtmpfix command.. will it lead to server reboot or loss in the data which is there in wtmpx file.

I even checked the size of wtmpx file its 6M file..
You use it like this:
Code:
cp /var/adm/wtmpx /var/adm/wtmpx.bak
/usr/lib/acct/wtmpfix /var/adm/wtmpx > /var/adm/wtmpx.tmp
mv /var/adm/wtmpx.tmp /var/adm/wtmpx

No reboot is required. If there is some problem with last command after this operation, you can simply restore the file from the backup copy:
Code:
cp /var/adm/wtmpx.bak /var/adm/wtmpx

This User Gave Thanks to bartus11 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Creating a file that contains output from a command, and then displays itself

hey, I'm trying to create the command that will create a file named user.txt that contains the output of the command cut -d: -f1,5 /etc/passwd, and displays itself afterwards. I don't know how to bridge cat > user.txt with cut -d: -f1,5 /etc/passwd, or how display it afterwards. Any help would... (2 Replies)
Discussion started by: raidkridley
2 Replies

2. Shell Programming and Scripting

Is anything wrong with this command

Hi All, can anyone tell me what is wrong with this command. tail -f /opt/olr-logs/PaymentGateway.log | grep "DEBUG - Start! AkhtarPaymentGateway - generateChecksum" | awk '{print $13}' | sed 's/,//g'>> abc But I found nothing in the file abc Please do help me.or Provide me some... (8 Replies)
Discussion started by: akhtar.bhat
8 Replies

3. UNIX for Advanced & Expert Users

what is wrong with this find command

i am trying to find the files which are more than 100MB and it was created 10 days ago. find /lola/loaded -size +102400 -mtime -10 -print | xargs ls -ltr -rw-rw-r-- 1 lola_adm gdrmp 82054170 Jun 23 06:17 /lola/loaded/ILMEMBER20090622.txt -rw-rw-r-- 1 lola_adm gdrmp 652080494 Jun 24... (3 Replies)
Discussion started by: sudhiroracle
3 Replies

4. UNIX for Dummies Questions & Answers

what is wrong with this command?

Hello, I try to using the below command to find out all the datafiles under "sja" direcotory. $ xargs -i find {} -type f -ls < sja /bin/ksh: sja: cannot open so can you tell me what is wrong? Thanks Jerry (3 Replies)
Discussion started by: GreatJerry
3 Replies

5. UNIX for Advanced & Expert Users

xbindkeys giving wrong mapping information

Hello, I'm having a problem with xbindkeys giving the wrong mapping information, hence I can't get it work at all when trying new mappings from this machine. From another computer, I have some definitions for xbindkeys (made with xbindkeys-config). These key codes work correctly on this... (0 Replies)
Discussion started by: Narnie
0 Replies

6. AIX

Command last displays wrong hostname

I faced an interesting problem on my AIX servers. When I checked last logins with command last I saw that hostnames are wrong. Let say, I made login from workstation xxxxx and with the command last I saw: root pts/2 yyyyy 5 jan 15:38 still logged in Ping xxxxx and ping... (3 Replies)
Discussion started by: giovanni
3 Replies

7. Shell Programming and Scripting

What's wrong with the following command?

Hi all, I'm trying to run the following command to get all files in one directory to another with the files' timestamps preserved, cp -p /logs/dvgbiau/batch/* /logs/dvgbiau/tmp_batch Note that ./batch and ./tmp_batch are two sub-directories under /logs/dvgbiau. The error was,... (1 Reply)
Discussion started by: isaacniu
1 Replies

8. UNIX for Dummies Questions & Answers

Which of the following command displays your login shell in bash shell?

Options:: A)$shell B)echo $ bash C)echo $ O D)$ O (1 Reply)
Discussion started by: raghugowda
1 Replies

9. Shell Programming and Scripting

Bash $(...) DISPLAYS EVERY COMMAND

I use things like this a lot in ksh and bash, but lately bash has been printing the command for every loop: ... | while read f do if then echo Differ "$f" fi done How to prevent this? (5 Replies)
Discussion started by: DGPickett
5 Replies

10. UNIX for Beginners Questions & Answers

Create a shell script to gather user account information and displays the result to administrator

I want to create a shell script to gather user account information and displays the result to administrator. I have created a script but its showing all the information when i search for username like: amit@mx:~$ ./uinfo.sh amit Username : amit User Info ... (2 Replies)
Discussion started by: amit1986
2 Replies
scstat(1M)						  System Administration Commands						scstat(1M)

NAME
scstat - monitor the status of a Sun Cluster configuration SYNOPSIS
scstat [-DWginpqv [v]] [-h node] DESCRIPTION
Note - Beginning with the Sun Cluster 3.2 release, Sun Cluster software includes an object-oriented command set. Although Sun Cluster software still supports the original command set, Sun Cluster procedural documentation uses only the object-oriented command set. For more infor- mation about the object-oriented command set, see the Intro(1CL) man page. The scstat command displays the current state of Sun Cluster components. Only one instance of the scstat command needs to run on any machine in the Sun Cluster configuration. When run without any options, scstat displays the status for all components of the cluster. This display includes the following informa- tion: o A list of cluster members o The status of each cluster member o The status of resource groups and resources o The status of every path on the cluster interconnect o The status of every disk device group o The status of every quorum device o The status of every IP network multipathing (IPMP) group and public network adapter From a non-global zone, referred to simply as a zone, you can run all forms of this command except the -i option. When you run the scstat command from a non-global zone, the output is the same as when run from the global zone except that no status information is displayed for IP network multipathing groups or public network adapters. You need solaris.cluster.device.read, solaris.cluster.transport.read, solaris.cluster.resource.read, solaris.cluster.node.read, solaris.cluster.quorum.read, and solaris.cluster.system.read RBAC authorization to use this command without options. See rbac(5). Resources and Resource Groups The resource state, resource group state, and resource status are all maintained on a per-node basis. For example, a given resource has a distinct state on each cluster node and a distinct status on each cluster node. The resource state is set by the Resource Group Manager (RGM) on each node, based only on which methods have been invoked on the resource. For example, after the STOP method has run successfully on a resource on a given node, the resource's state will be OFFLINE on that node. If the STOP method exits nonzero or times out, then the state of the resource is Stop_failed. Possible resource states include: Online, Offline, Start_failed, Stop_failed, Monitor_failed, Online_not_monitored, Starting, and Stopping. Possible resource group states are: Unmanaged, Online, Offline, Pending_online, Pending_offline, Error_stop_failed, Online_faulted, and Pending_online_blocked. In addition to resource state, the RGM also maintains a resource status that can be set by the resource itself by using the API. The field Status Message actually consists of two components: status keyword and status message. Status message is optionally set by the resource and is an arbitrary text string that is printed after the status keyword. Descriptions of possible values for a resource's status are as follows: DEGRADED The resource is online, but its performance or availability might be compromised in some way. FAULTED The resource has encountered an error that prevents it from functioning. OFFLINE The resource is offline. ONLINE The resource is online and providing service. UNKNOWN The current status is unknown or is in transition. Device Groups Device group status reflects the availability of the devices in that group. The following are possible values for device group status and their descriptions: DEGRADED The device group is online, but not all of its potential primaries (secondaries) are up. For two-node connectivity, this status basically indicates that a stand-by primary does not exist, which means a failure of the primary node will result in a loss of access to the devices in the group. OFFLINE The device group is offline. There is no primary node. The device group must be brought online before any of its devices can be used. ONLINE The device group is online. There is a primary node, and devices within the group are ready for I/O. WAIT The device group is between one status and another. This status might occur, for example, when a device group is going from offline to online. IP Network Multipathing Groups IP network multipathing (IPMP) group status reflects the availability of the backup group and the adapters in the group. The following are possible values for IPMP group status and their descriptions: OFFLINE The backup group failed. All adapters in the group are offline. ONLINE The backup group is functional. At least one adapter in the group is online. UNKNOWN Any other state than those listed before. This could result when an adapter is detached or marked as down by Solaris commands such as if_mpadm or ifconfig. The following are possible values for IPMP adapter status and their descriptions: OFFLINE The adapter failed or the backup group is offline. ONLINE The adapter is functional. STANDBY The adapter is on standby. UNKNOWN Any other state than those listed before. This could result when an adapter is detached or marked as down by Solaris commands such as if_mpadm or ifconfig. OPTIONS
You can specify command options to request the status for specific components. If more than one option is specified, the scstat command prints the status in the specified order. The following options are supported: -D Shows status for all disk device groups. You can use this option in the global zone or in a non-global zone. For ease of administration, use this form of the command in the global zone. Output is the same when run from a zone as when run from the global zone. You need solaris.cluster.device.read RBAC authorization to use this command option. See rbac(5). -g Shows status for all resource groups. You can use this option in the global zone or in a non-global zone. For ease of administration, use this form of the command in the global zone. Output is the same when run from a zone as when run from the global zone. You need solaris.cluster.resource.read RBAC authorization to use this command option. See rbac(5). -h node Shows status for the specified node (node) and status of the disk device groups of which this node is the primary node. Also shows the status of the quorum devices to which this node holds reservations of the resource groups to which the node is a potential master, and holds reservations of the transport paths to which the node is attached. You need solaris.cluster.device.read, solaris.cluster.transport.read, solaris.cluster.resource.read, solaris.clus- ter.node.read, solaris.cluster.quorum.read, and solaris.cluster.system.read RBAC authorization to use this command option. See rbac(5). -i Shows status for all IPMP groups and public network adapters. You can use this option only in the global zone. -n Shows status for all nodes. You can use this option in the global zone or in a non-global zone. For ease of administration, use this form of the command in the global zone. Output is the same when run from a zone as when run from the global zone. You need solaris.cluster.node.read RBAC authorization to use this command option. See rbac(5). -p Shows status for all components in the cluster. Use with -v to display more verbose output. You can use this option in the global zone or in a non-global zone. For ease of administration, use this form of the command in the global zone. Output is the same when run from a zone as when run from the global zone, except that no status for IPMP groups or public net- work adapters is displayed. You need solaris.cluster.device.read, solaris.cluster.transport.read, solaris.cluster.resource.read, solaris.clus- ter.node.read, solaris.cluster.quorum.read, and solaris.cluster.system.read RBAC authorization to use -p with -v. See rbac(5). -q Shows status for all device quorums and node quorums. You can use this option in the global zone or in a non-global zone. For ease of administration, use this form of the command in the global zone. Output is the same when run from a zone as when run from the global zone. You need solaris.cluster.quorum.read RBAC authorization to use this command option. See rbac(5). -v[v] Shows verbose output. -W Shows status for cluster transport path. You can use this option in the global zone or in a non-global zone. For ease of administration, use this form of the command in the global zone. Output is the same when run from a zone as when run from the global zone. You need solaris.cluster.transport.read RBAC authorization to use this command option. See rbac(5). EXAMPLES
Example 1 Using the scstat Command The following command displays the status of all resource groups followed by the status of all components related to the specified host: % scstat -g -h host The output that is displayed appears in the order in which the options are specified. These results are the same results you would see by typing the two commands: % scstat -g and % scstat -h host EXIT STATUS
The following exit values are returned: 0 The command completed successfully. nonzero An error has occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsczu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
Intro(1CL), cluster(1CL), if_mpadm(1M), ifconfig(1M), scha_resource_setstatus(1HA), scha_resource_setstatus(3HA), attributes(5) NOTES
An online quorum device means that the device was available for contributing to the formation of quorum when quorum was last established. From the context of the quorum algorithm, the device is online because it actively contributed to the formation of quorum. However, an online quorum device might not necessarily continue to be in a healthy enough state to contribute to the formation of quorum when quorum is re-established. The current version of Sun Cluster does not include a disk monitoring facility or regular probes to the quorum devices. Sun Cluster 3.2 10 Jul 2006 scstat(1M)
All times are GMT -4. The time now is 05:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy