16429Svs195195 /* 26429Svs195195 * CDDL HEADER START 36429Svs195195 * 46429Svs195195 * The contents of this file are subject to the terms of the 56429Svs195195 * Common Development and Distribution License (the "License"). 66429Svs195195 * You may not use this file except in compliance with the License. 76429Svs195195 * 86429Svs195195 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 96429Svs195195 * or http://www.opensolaris.org/os/licensing. 106429Svs195195 * See the License for the specific language governing permissions 116429Svs195195 * and limitations under the License. 126429Svs195195 * 136429Svs195195 * When distributing Covered Code, include this CDDL HEADER in each 146429Svs195195 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 156429Svs195195 * If applicable, add the following below this CDDL HEADER, with the 166429Svs195195 * fields enclosed by brackets "[]" replaced with your own identifying 176429Svs195195 * information: Portions Copyright [yyyy] [name of copyright owner] 186429Svs195195 * 196429Svs195195 * CDDL HEADER END 206429Svs195195 */ 216429Svs195195 226429Svs195195 /* 236429Svs195195 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 246429Svs195195 * Use is subject to license terms. 256429Svs195195 */ 266429Svs195195 276429Svs195195 #ifndef _MESSAGES_H 286429Svs195195 #define _MESSAGES_H 296429Svs195195 306429Svs195195 /* 316429Svs195195 * Messages 326429Svs195195 */ 336429Svs195195 346429Svs195195 #ifdef __cplusplus 356429Svs195195 extern "C" { 366429Svs195195 #endif 376429Svs195195 386429Svs195195 #include <libintl.h> 396429Svs195195 406429Svs195195 /* Messages used in fpsd_main.c */ 416429Svs195195 426429Svs195195 #define DAEMON_ALREADY_RUNNING \ 436429Svs195195 gettext("Can not start daemon when another instance"\ 446429Svs195195 " is already running.\n") 456429Svs195195 466429Svs195195 #define DAEMON_INIT_FAIL \ 476429Svs195195 gettext("Could not intialize state structures for the daemon.\n") 486429Svs195195 496429Svs195195 #define DAEMON_PIPE_FAIL \ 506429Svs195195 gettext("Failed to create pipe for daemonizing : %s\n") 516429Svs195195 526429Svs195195 #define DAEMON_FORK_FAIL \ 536429Svs195195 gettext("Failed to fork daemon into background : %s\n") 546429Svs195195 556429Svs195195 #define DAEMON_DOOR_FAIL \ 566429Svs195195 gettext("Library call door_create failed : %s\n") 576429Svs195195 586429Svs195195 #define DAEMON_DOOR_FILE_FAIL \ 596429Svs195195 gettext("Could not create door file : %s\n") 606429Svs195195 616429Svs195195 #define DAEMON_DOOR_FATTACH_FAIL \ 626429Svs195195 gettext("Could not fattach to door file : %s\n") 636429Svs195195 646429Svs195195 #define CORE_DIR_CREATION_FAILED \ 656429Svs195195 gettext("%s directory could not be created for "\ 666429Svs195195 "storing core files : %s\n") 676429Svs195195 686429Svs195195 #define LIBRARY_CALL_FAIL \ 696429Svs195195 gettext("Library call %s failed : %s\n") 706429Svs195195 716429Svs195195 #define SYSTEM_CALL_FAIL \ 726429Svs195195 gettext("System call %s failed : %s\n") 736429Svs195195 747346SVaidehi.Rangan@Sun.COM #define INVALID_CPUID \ 757346SVaidehi.Rangan@Sun.COM gettext("Invalid cpuid: %s\n") 767346SVaidehi.Rangan@Sun.COM 776429Svs195195 #define CPU_NOT_SUPPORTED \ 786429Svs195195 gettext("%s CPU brand of CPU ID %d is not supported by FP Scrubber.\n") 796429Svs195195 806429Svs195195 #define CPU_BRAND_PROBE_FAIL \ 816429Svs195195 gettext("Could not read Brand for CPU ID %d.\n") 826429Svs195195 836429Svs195195 #define FREQ_PROBE_FAIL \ 846429Svs195195 gettext("Could not probe frequency for CPU ID %d.\n") 856429Svs195195 866429Svs195195 #define FPSD_ZERO_INTVL \ 876429Svs195195 gettext("Some error occured in calculating interval;"\ 886429Svs195195 " interval calculated = %d\n") 896429Svs195195 906429Svs195195 #define FPSD_NO_CPUS_TO_TEST \ 916429Svs195195 gettext("FP Scrubber is not supported on "\ 926429Svs195195 " the processors that are online\n") 936429Svs195195 946429Svs195195 #define SMF_INVOKED \ 956429Svs195195 gettext("Program started through SMF; state = %s\n") 966429Svs195195 976429Svs195195 #define CL_INVOKED \ 986429Svs195195 gettext("Program started through command line; state = %s\n") 996429Svs195195 1006429Svs195195 #define INSUFFICIENT_PRIVS \ 1016429Svs195195 gettext("Insufficient priviliges to run %s. Exiting...\n") 1026429Svs195195 1036429Svs195195 #define UNSUPPORTED_SYSTEM \ 1046429Svs195195 gettext("System configuration probe failed. Exiting ...\n") 1056429Svs195195 1066429Svs195195 #define THR_CREATION_FAIL \ 1076429Svs195195 gettext("Initialization Failure: " \ 1086429Svs195195 " Could not create test scheduling thread.\n") 1096429Svs195195 1106429Svs195195 #define ESTAR_INFO \ 1116429Svs195195 gettext("Actual testing is done only when the system " \ 1126429Svs195195 " is not in idle state.\n") 1136429Svs195195 1146429Svs195195 #define PROP_UNDEFINED \ 1156429Svs195195 gettext("Reading of property %s failed for the "\ 1166429Svs195195 "service instance; reason : %s\n") 1176429Svs195195 1186429Svs195195 #define USAGE_MSG gettext("\nUsage: %s [-dl[0..3]] \n") 1196429Svs195195 1206429Svs195195 #define DOOR_SETUP_FAIL \ 1216429Svs195195 gettext("Could not setup lock mechanism."\ 1226429Svs195195 " This might happen if another instance of fpsd is running.\n") 1236429Svs195195 1246429Svs195195 #define PRINT_INTVL gettext("Calculated time interval = %d .\n") 1256429Svs195195 1266429Svs195195 #define SIGNAL_INFO gettext("Process received SIG%s (%d) signal.\n") 1276429Svs195195 1286429Svs195195 #define FORK_FAIL_MSG gettext("Could not start CPU test program: %s\n" \ 1296429Svs195195 "System call fork() failed. Reason: %s\n") 1306429Svs195195 1316429Svs195195 #define TST_EXEC_FAIL gettext("Could not execute CPU test program: %s"\ 1326429Svs195195 "\n Reason: %s\n") 1336429Svs195195 134*7571SVaidehi.Rangan@Sun.COM #define SWAP_WARN gettext("Low swap space: Test: %s was not invoked.") 1356429Svs195195 1366429Svs195195 #define START_TEST_MSG gettext("Start Test :%s -f %s -p %s -d %s\n") 1376429Svs195195 1386429Svs195195 #define END_TST_MSG \ 1396429Svs195195 gettext("End Test (PID=%d) Time: %dH.%dM.%dS.%dMsecs %s\n") 1406429Svs195195 1416429Svs195195 #define DI_INIT_FAIL \ 1426429Svs195195 gettext("Could not get device info tree information: " \ 1436429Svs195195 " di_init() failed.\n") 1446429Svs195195 1456429Svs195195 #define DI_PROM_INIT_FAIL \ 1466429Svs195195 gettext("Could not get PROM tree information: " \ 1476429Svs195195 " di_prom_init() failed.\n") 1486429Svs195195 1496429Svs195195 #define INTERNAL_FAILURE_WARN \ 1506429Svs195195 gettext("Would recover from internal software failure:\n"\ 1516429Svs195195 " ioctl /dev/pm PM_GET_STATE_CHANGE : %s\n") 1526429Svs195195 1536429Svs195195 #define INTERNAL_FAILURE_WARN1 \ 1546429Svs195195 gettext("Would recover from internal software failure:\n"\ 1556429Svs195195 " ioctl /dev/pm PM_GET_CURRENT_POWER : %s\n") 1566429Svs195195 1576429Svs195195 #define INTERNAL_FAILURE_WARN2 \ 1586429Svs195195 gettext("Would recover from internal software failure:\n"\ 1596429Svs195195 " ioctl /dev/pm PM_GET_STATE_CHANGE_WAIT : %s\n") 1606429Svs195195 1616429Svs195195 #define FPU_INVALID_ARG_MSG \ 1626429Svs195195 gettext("Invalid arguments passed to fp-test\n") 1636429Svs195195 1646429Svs195195 #define FPU_SIG_RCVD \ 1656429Svs195195 gettext("FP test on %d received signal.\n") 1666429Svs195195 1676429Svs195195 #define FPU_SIG_ILL_MSG \ 1686429Svs195195 gettext("FP test on FPU %d received SIGILL.\n") 1696429Svs195195 1706429Svs195195 #define FPU_SYSCALL_FAIL_MSG \ 1716429Svs195195 gettext("Syscall failed for FP test on FPU %d\n") 1726429Svs195195 1736429Svs195195 #define FPU_EREPORT_INCOM_MSG \ 1746429Svs195195 gettext("FP test on FPU %d could not complete ereport generation.\n") 1756429Svs195195 1766429Svs195195 #define FPU_FPE_MSG \ 1776429Svs195195 gettext("FP test encountered floating point exception on FPU %d.\n") 1786429Svs195195 1796429Svs195195 #define FPU_SYSCALL_TRYAGAIN_MSG \ 1806429Svs195195 gettext("Syscall failed probably due to temporary "\ 1816429Svs195195 "unavailability of resources; Trying again!\n") 1826429Svs195195 1836429Svs195195 #define INVAL_PROP_VALUE \ 1847346SVaidehi.Rangan@Sun.COM gettext("Invalid property value defined: %s;\n"\ 1857346SVaidehi.Rangan@Sun.COM "\tIgnoring field exclude_cpus.\n") 1866429Svs195195 1876429Svs195195 #define FPU_EREPORT_FAIL_MSG \ 1886429Svs195195 gettext("FP test on FPU %d could not file ereport.\n") 1896429Svs195195 1906429Svs195195 #define FPU_TIMED_OUT_MSG \ 1916429Svs195195 gettext("Test could not be scheduled on FPU %d; Daemon timed out\n") 1926429Svs195195 1936429Svs195195 #define FPSD_MIS_CALCULATIONS \ 1946429Svs195195 gettext("There was some errorin calculating total iterations "\ 1956429Svs195195 "in one pass: %d\n") 1966429Svs195195 1976429Svs195195 #define REPROBE_MSG \ 1986429Svs195195 gettext("Num onln cpus changed; Reprobing...\n") 1996429Svs195195 2006429Svs195195 #define IDENTIFY_FPU_MSG \ 2016429Svs195195 gettext("In the beginning, fpuid_index = %d, " \ 2026429Svs195195 "d_iteration = %d, tot_iter = %d, Total cpus = %d\n") 2036429Svs195195 2046429Svs195195 #define IDENTIFY_FPU_RTN_MSG \ 2056429Svs195195 gettext("Before returning, fpuid = %d, iter = %d, freq= %d, " \ 2066429Svs195195 "prev_iter = %d, total_iter = %d\n") 2076429Svs195195 2086429Svs195195 #define RECORD_FAILURE_MSG \ 2096429Svs195195 gettext("Recording failure for fpu %d at %d\n") 2106429Svs195195 2116429Svs195195 #define EXIT_STAT_MSG \ 2126429Svs195195 gettext("FP test exit status = %d\n") 2136429Svs195195 2147346SVaidehi.Rangan@Sun.COM #define INTVL_CHANGED_MSG \ 2157346SVaidehi.Rangan@Sun.COM gettext("Interval changed in scheduler: %d\n") 2167346SVaidehi.Rangan@Sun.COM 2176429Svs195195 #define RESCHEDULE_MSG \ 2186429Svs195195 gettext("Rescheduling test for %d\n") 2196429Svs195195 2206429Svs195195 #define TOT_ITERS \ 2216429Svs195195 gettext("Total iterations = %d, number of cpus to test = %d\n") 2226429Svs195195 2236429Svs195195 #define NUM_ONLN_CPUS \ 2246429Svs195195 gettext("Numberofonlncpus=%d:\n") 2256429Svs195195 2266429Svs195195 #define CPU_INFO \ 2276429Svs195195 gettext("Cpuid = %d, cpu brand = %s, frequency = %d\n") 2286429Svs195195 2296429Svs195195 #define NUM_CPUS_2_TST \ 2306429Svs195195 gettext("Cpuids_size after probe = %d\n") 2316429Svs195195 2326429Svs195195 #define NUM_IGN_CPUS \ 2336429Svs195195 gettext("Number of cpus to be excluded from testing = %d\n") 2346429Svs195195 2356429Svs195195 #define IGN_CPUS \ 2366429Svs195195 gettext("Ignoring cpu %d\n") 2376429Svs195195 2386429Svs195195 #define CREATE_FAIL \ 2396429Svs195195 gettext("Unable to create SCF instance/property group/property: %s\n") 2406429Svs195195 2416429Svs195195 #define HANDLE_DECODE_FAIL \ 2426429Svs195195 gettext("Unable to decode FMRI : %s") 2436429Svs195195 2447346SVaidehi.Rangan@Sun.COM #define SNAPSHOT_CREAT_FAIL \ 2457346SVaidehi.Rangan@Sun.COM gettext("Unable to create SCF snapshot: %s\n") 2467346SVaidehi.Rangan@Sun.COM 2477346SVaidehi.Rangan@Sun.COM #define INST_SNAPSHOT_GET_FAIL \ 2487346SVaidehi.Rangan@Sun.COM gettext("Unable to set snapshot in instance: %s\n") 2497346SVaidehi.Rangan@Sun.COM 2506429Svs195195 #define INSTANCE_PG_GET_FAIL \ 2516429Svs195195 gettext("Instance properties could not be obtained: %s\n") 2526429Svs195195 2536429Svs195195 #define INTVL_VAL \ 2546429Svs195195 gettext("From SMF repository, interval = %lld\n") 2556429Svs195195 2566429Svs195195 #define EXCL_CPUS \ 2576429Svs195195 gettext("From SMF repository, cpus to be excluded = %s\n") 2586429Svs195195 2596429Svs195195 #define SMF_INVKD \ 2606429Svs195195 gettext("SMF invoked; fpsd fmri = %s\n") 2616429Svs195195 2626429Svs195195 #define CLI_INVKD \ 2636429Svs195195 gettext("CLI invocation\n") 2646429Svs195195 2656429Svs195195 #define FPTST_BIN_PTH \ 2666429Svs195195 gettext("Searching for fptest binary location = %s\n") 2676429Svs195195 2686429Svs195195 #define FPSD_STATE \ 2697346SVaidehi.Rangan@Sun.COM gettext("Service disabled successfully. \n") 2707346SVaidehi.Rangan@Sun.COM 2717346SVaidehi.Rangan@Sun.COM #define DISABLE_SVC_FAILED \ 2727346SVaidehi.Rangan@Sun.COM gettext("Disabling service failed; Current state = %s\n") 2736429Svs195195 2746429Svs195195 #define REPRBE_REQ \ 2756429Svs195195 gettext("Reprobe request recd.\n") 2766429Svs195195 2776429Svs195195 #define DOOR_HNDLR_MSG \ 2786429Svs195195 gettext("Server received door call: Version %d; type: %x; len:%d \n") 2796429Svs195195 2806429Svs195195 #define UNBIND_FAIL_MSG \ 2816429Svs195195 gettext("Unable to unbind after fptest timeout: %s\n") 2826429Svs195195 2836429Svs195195 #define TST_SIGNALED_MSG \ 2846429Svs195195 gettext("Fptest on cpu %d, matrix size = %d died due to signal %s\n") 2856429Svs195195 2866429Svs195195 #define MIN_INTERVAL_MSG \ 2876429Svs195195 gettext("Calculated interval = %d which is less than min interval.\n"\ 2886429Svs195195 "Setting interval to %d\n") 2896429Svs195195 2906429Svs195195 #define ALL_CPUS_EXCLDED \ 2916429Svs195195 gettext("All cpus are excluded from testing through "\ 2926429Svs195195 "config/exclude_cpus properties for the service. \n") 2936429Svs195195 2947346SVaidehi.Rangan@Sun.COM #define GET_TIME_FAILED \ 2957346SVaidehi.Rangan@Sun.COM gettext("gettimeofday failed: %s\n") 2967346SVaidehi.Rangan@Sun.COM 2977346SVaidehi.Rangan@Sun.COM #define LOCAL_TIME_FAILED \ 2987346SVaidehi.Rangan@Sun.COM gettext("localtime_r failed: %s\n") 2997346SVaidehi.Rangan@Sun.COM 3007346SVaidehi.Rangan@Sun.COM #define STRFTIME_FAILED \ 3017346SVaidehi.Rangan@Sun.COM gettext("strftime failed: buffer[%d] too small\n") 3027346SVaidehi.Rangan@Sun.COM 3037346SVaidehi.Rangan@Sun.COM #define PRINT_BUFFER \ 3047346SVaidehi.Rangan@Sun.COM gettext("%s") 3057346SVaidehi.Rangan@Sun.COM 3067435SVaidehi.Rangan@Sun.COM #define ZERO_CPUS_2_TST \ 3077435SVaidehi.Rangan@Sun.COM gettext("Assertion failed: While trying to calculate total"\ 3087435SVaidehi.Rangan@Sun.COM " iterations, no cpus to test.\n") 3097435SVaidehi.Rangan@Sun.COM 3107435SVaidehi.Rangan@Sun.COM #define INVALID_FPU_ID \ 3117435SVaidehi.Rangan@Sun.COM gettext("Assertion failed: An FPU could not be identified "\ 3127435SVaidehi.Rangan@Sun.COM "to schedule test.\n") 3137435SVaidehi.Rangan@Sun.COM 3147435SVaidehi.Rangan@Sun.COM #define REPROBE_FAILURE \ 3157435SVaidehi.Rangan@Sun.COM gettext("Reprobe failed. Exiting...\n") 3167435SVaidehi.Rangan@Sun.COM 317*7571SVaidehi.Rangan@Sun.COM #define INFINITE_LOOP_MSG \ 318*7571SVaidehi.Rangan@Sun.COM gettext("Assertion failed: No testable CPU could be identified "\ 319*7571SVaidehi.Rangan@Sun.COM " after traversing the list of CPUs.\n") 320*7571SVaidehi.Rangan@Sun.COM 3216429Svs195195 #ifdef __cplusplus 3226429Svs195195 } 3236429Svs195195 #endif 3246429Svs195195 3256429Svs195195 #endif /* _MESSAGES_H */ 326